0
$\begingroup$

Rosanswers logo

Hi! Newbie here. I was trying to run gmapping on our own model but I can't seem to solve this problem in rviz, it says no map received. My global fixed frame is odom and map is subscribed to /map topic. I am trying to generate a map. I am using Ubuntu 20.04 and ROS noetic for this. My tf frames are

world->base_footprint->based_stabelized->base_link->laser

map->odom

Can someone help me with this one? Is there any way I can modify the tf frames?


Originally posted by mgrallos on ROS Answers with karma: 11 on 2022-03-20

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Hey, Your tf should be map->odom->base_footprint->.... Also, your global fixed frame will be map.


Originally posted by charithreddy101 with karma: 11 on 2022-03-21

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by mgrallos on 2022-03-21:
Hi I figure that I need to change the tf tree as well. How do I exactly do that?

Comment by charithreddy101 on 2022-03-22:
Please give more information regarding your problem while asking the question so that people can give you an exact solution. Include if you are working on a simulated model by using any gazebo plugins, controllers or making a real robot.

Coming to the tf, if you are using the gazebo plugins or calculation odom data using math, you must have declared your odom frame and base_footprint in the plugin itself. It will directly create a transform between /odom and /base_footprint

Else, you can also create a static transform as @nigeno said.

$\endgroup$
0
$\begingroup$

Rosanswers logo

First, you need to make sure that you have /map published.

To check it, run:

rostopic list

see that you have /map in the list.

To check /map message published, run:

rostopic echo /map

Next, if you have the /map published but you don't see it in Rviz, then you should have a problem in Rviz setup. If you found that /map is not published, check your gmapping, it might be that you don't have proper /tf or other reasons.


Originally posted by nigeno with karma: 76 on 2022-03-21

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by mgrallos on 2022-03-21:
Hi, thanks. I have map in my rostopic list. According to my research, I need to modify TF tree but I really have no idea how to do. I only knew how to set odom_fram and base_frame and it create a separate TF tree

Comment by nigeno on 2022-03-21:
it's not clear why you would need the transforms if you have /map topic. But anyways..

What's your relation between base_link and odom frames?

The reason why I'm asking is you need to provide two transformations to gmapping to work: base_link -> laser; odom -> base_link

If you have them plus /laser topic then gmapping will give you map -> odom transformation plus /map.

The other transforms shouldn't be required for gmapping to work.

To test it out use the following static transforms:

rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_link

rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 base_link laser

If this works, then you know which transforms you need and you can provide dynamic ones.

Comment by mgrallos on 2022-05-04:
Hi thank you for this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.