rviz relative laser TF orientation seems wrong
It is likely I am not understanding something fundamental, but when I show laser scan data relative to a laser TF, RViz shows it in a strange orientation with respect to my base_laser frame. The "front" (that is, the scan points ahead of me) becomes the joint where the X and Y axis meet, so I see the scan points "ahead". But this, however, is not how the laser is mounter; Forward is the "X" direction along the x axis the TF. What we want, is the scan points to be ahead of the X axis...but this is never the case.
I tried to upload a screen capt, but apparently I need "5 points" in the forums to do this. So let me try this in text.
I get this:
X< (X is scan point(s) , and '<' is the X and Y axis of the TF as shown in Rviz (Y on top))
we want this: X_|
Where '_' would be my "forward" X axis of my TF and Y would be perpendicular to that.
Appreciate any guidance, am really not sure what I am missing.
Asked by codenotes on 2015-11-12 16:17:58 UTC
Answers
I found the issue. You will get a rotated or transformed set of scan points if angle_min and angle_max are incorrect in your published laser_scan. I had in psuedocode:
scan.angle_min = -270 scan.angle_max = 270
where I needed to have and meant to have:
scan.angle_min = -270/2 scan.angle_max = 270/2
Silly mistake.
Asked by codenotes on 2015-11-12 16:44:38 UTC
Comments
You can mark your own answer as accepted if this solves your issue.
Asked by Akif on 2015-11-13 02:01:48 UTC
unfortunately, being relatively new to the forums I don't have the community points to do much. ansers.ros says I need >10 to accept the answer. I can't upload pictures or files either.
Asked by codenotes on 2015-11-13 07:42:07 UTC
Comments
I did not get exactly what you ask for but it can be helpful if you can post your TF tree (
rosrun tf view_frames
) and tf broadcaster code between your base_link and base_laser frames.Asked by Akif on 2015-11-12 16:33:03 UTC