ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

probleme with gmapping

asked 2018-03-26 04:57:39 -0600

kesuke gravatar image

updated 2018-03-26 08:57:49 -0600

gvdhoorn gravatar image

hi ,

i'm trying to use gmapping with my own robot but get some troubles with the map ,i write all transformation (base link ,odom , laser ) but i don't understand how to write the TF between base_link and map i tried to use this : rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 1.0 base_link map 100 , it's seems that this one let the robot build the map but the map is wrong and on rviz i'm seing the odom frame move alone when the robot dont move can anyone what is the right tf between base_link and map ?

thank you in advance for your answers


Edit: this is my tf_tree

image description

edit retag flag offensive close merge delete

Comments

It would be useful if you posted a picture of your TF tree.

stevejp gravatar image stevejp  ( 2018-03-26 06:45:12 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-26 07:15:25 -0600

kylerlaird gravatar image

[kesuke, I have only recently started understanding how to manipulate transforms. I enjoy working with them now but I do not consider myself an expert. I recently modified the driver for my INS (inertial navigation system) to output a transform for its pose. This was amazingly helpful and was the key to all of the progress I have made recently. I think I understand what you're asking from this perspective but please understand I'm still a novice in this area.]

The TF between /base_link and /map is the position and orientation of your robot with respect to the map. It is not static. It's likely that you'll get your position from wheel odometry or GNSS, and your orientation from an IMU or visual system.

I notice you have an odom frame so you might almost be done. I get my odometry from GNSS so my /odom is the pose of my antenna (fused with IMU data). I then make a static transform from the antenna to base_link (a spot on the ground in the middle of my tractor).

I suspect that you do not need to specify a TF between base_link and map. Instead, create a static transform between /odom (which is dynamic and likely defined with respect to /map or /world) and your base_link. For example, the origin of /odom might be the midpoint of an axle, and /base_link might be the center of mass of your robot.

Once you have the transform between /odom and /base_link, ROS will compute the transform between /map and /base_link.

edit flag offensive delete link more

Comments

kylerlaird thank you for your explanation, as you say i made the tf between /odm and base_link but when i run gamapping it's not building any map and i's says on rviz : No transform from [map] to frame [base_link] that's why i use tf static_transform_publisher

kesuke gravatar image kesuke  ( 2018-03-26 08:36:05 -0600 )edit

Does the tf_tree you posted represent your use of "rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 1.0 base_link map 100"? I don't see it.

Why does the odom->base_link TF have "0.0" for oldest and most recent? That seems wrong. Maybe RViz is waiting for a transform update?

kylerlaird gravatar image kylerlaird  ( 2018-03-26 10:40:30 -0600 )edit

thank for your answer you were right ros compute the transform between /map and /base_link , i found my mistake on the TF between /odom and /base_link i use this tutorial : http://wiki.ros.org/navigation/Tutori... where odom.header.stamp = current_time instead ros::Time::now()

kesuke gravatar image kesuke  ( 2018-03-27 09:10:43 -0600 )edit

so now it's working thank you for your explanations it was helpful

kesuke gravatar image kesuke  ( 2018-03-27 09:11:18 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-03-26 04:57:39 -0600

Seen: 773 times

Last updated: Mar 26 '18