Map not visible in Rviz
Hi,
I'm trying to visualize and create a map using a Lidar in Rviz.
I have a Lidar that publishes the LaserScan
data on /scan
and that is visible in Rviz. That is working fine.
I also have installed slam_gmapping and run that as following:
rosrun gmapping slam_gmapping scan:=scan
i suppose that this should publish a map on the /map
topic, but there is nothing visible in Rviz?
I guess i have to so something with tf_static_transform_publisher
but i dont understand it.
I'm using a Raspberry Pi Mouse (https://products.rt-net.jp/micromouse/en/raspberry-pi-mouse) with a Lidar on top of it.
Asked by Maagtablet on 2019-10-10 05:01:00 UTC
Comments
This is a custom robot? Have you modelled your robot (ie: do you have a urdf/xacro) and the location of the lidar? The first part of this tutorial (ie: the first section) has a decent overview for why that would be desirable/required. You don't necessarily need to write any code.
Gmapping must be outputting messages, but you don't mention any, so it's hard to know what could be going wrong.
Asked by gvdhoorn on 2019-10-10 05:33:32 UTC
The problem is that i dont know what the output is of gmapping
Asked by Maagtablet on 2019-10-10 06:11:07 UTC
So you have no log messages on your console at all? If you could just copy-paste everything on your console after launching your system that would already help.
I would also recommend taking a look at some other robots, and how they've setup their systems to start
gmapping
, such as the turtlebot (here). There are many parameters that influence its behaviour. Just startingslam_gmapping
could result in inefficient/unwanted defaults.Asked by gvdhoorn on 2019-10-10 06:16:16 UTC
I have watched the launch-file of turtlebot. But what i dont understand is what to publish on
odom
andbase_footprint
topicAsked by Maagtablet on 2019-10-10 06:36:52 UTC
base_footprint
andodom
are not topics, they are TF frames.This is not a direct solution, but I would recommend trying to become a little more familiar with how ROS (for mobile bases/service robots) is typically used and configured.
It might also help (others, as I'm not really into navigation) if you could describe your robot a bit more. Without more information on what you already have and don't have it's going to be hard to provide suggestions.
Asked by gvdhoorn on 2019-10-10 06:46:29 UTC