Ask Your Question
0

Turtlebot RVIZ visualisation opposite from real Robot

asked 2017-01-31 11:07:29 -0600

Rayner gravatar image

updated 2017-01-31 11:08:19 -0600

Hi, I am currently facing an RVIZ problem. The turtlebot robot model on RVIZ displays itself as backwards to that of the actual robot such that when I use keyboard teleop to control, the actual robot moves forward but RVIZ displays it moving backwards. Changing the teleop commands does not work as it still ends up going in opposite directions. Here is the link to the video of the problem I am facing: https://youtu.be/SddtF5hGNvw

Not sure if it is related but this problem might also be affecting a successful launch of amcl and hector mapping as the laser scans from my rplidar A2 sensor do not display correctly. The following screenshots are in the links below

Laser scan before 2D pose estimate: https://www.dropbox.com/s/f7cbxygicsg...

Laser scan after 2D pose estimate (laser scan flips when I make the robot face the correct direction on RVIZ): https://www.dropbox.com/s/ahcy2v4mi8e...

Please help me out! Been struggling with this issue for quite some time already. Thanks in advance!

edit retag flag offensive close merge delete

Comments

Has it always done this (ie: TB came out of the box like this)? Or have you changed anything (hw, sw)?

gvdhoorn gravatar imagegvdhoorn ( 2017-01-31 11:53:16 -0600 )edit

I am currently trying to isolate the problem. I am unsure if it is an rviz visualization problem or hector mapping problem. By the way, is there a way to have an rviz visualization of turtlebot teleop with the actual robot? I don't think I changed hw or sw as I am using RPLidar A2 sensor only.

Rayner gravatar imageRayner ( 2017-02-01 01:04:50 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-31 22:47:32 -0600

hmchung gravatar image

updated 2017-02-01 03:36:39 -0600

I am making a guess here. Since your turtle_bot_teleop drives the robot while hector_slam builds the map independently, the problem could be your TF, the orientation of the laser maybe. Try checking your TF tree, especially the laser->base_link

edit flag offensive delete link more

Comments

Yes! That was the problem. I simply had to rotate the sensor by 180degrees and the RVIZ worked well. Now there is a wire sticking out in front of the turtlebot though, any idea how to rotate the tf frame by 180degrees instead? Thank you so much!

Rayner gravatar imageRayner ( 2017-02-01 01:33:34 -0600 )edit

I assume that you are starting the SLAM by a launch file, yeah? Try adding a static_transform_publisher. Something like this might work: <node pkg="tf" type="static_transform_publisher" name="laser_to_baselink" args="0 0 0 3.14159 0 0 /laser /base_link 50"/>

hmchung gravatar imagehmchung ( 2017-02-01 03:40:48 -0600 )edit

That works! Forgot that it is in radian..Thanks for your help.

Rayner gravatar imageRayner ( 2017-02-02 09:55:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-01-31 11:07:29 -0600

Seen: 874 times

Last updated: Feb 01 '17