I am working on the course project for navigation in 5 days, section II localization.
When launching the launch file I get the error No laser scan received. Verify that data is being published on the /scan topic.
When I check rostopic echo /scan it does return anything,
rostopic info /tf returns
Publishers:
- /amcl (http://3_xterm:33481/)
Subscribers:
- /amcl (http://3_xterm:33481/)
Are you running the right simulation with a laser scan?
If so, check for the right scan topic. It’s not necessarily /scan
.
rostopic list
I checked and /scan is running
What does rostopic info /scan
say and can you paste the output of rostopic list
here?
Ok, so rostopic info says:
Type: sensor_msgs/LaserScan
Publishers: None
Subscribers:
- /amcl (http://2_xterm:41975/)
and rostopic list:
/amcl/parameter_descriptions
/amcl/parameter_updates
/amcl_pose
/diagnostics
/initialpose
/map
/map_metadata
/particlecloud
/rosout
/rosout_agg
/scan
/tf
/tf_static
Okay, so nothing is publishing to the /scan
topic, that’s why you are getting that error. It’s the simulation (Gazebo) that publishes to it. Also, I see no Gazebo topics in the rostopic list
, so the simulation is not running.
Have you started the simulation? You should have the following running in another terminal or have the launch file for your localization package start it automatically.
roslaunch realrobotlab main.launch
Thank you so much for your help. Starting the main.launch file solved the problem.
1 Like