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

TF2 Static Transform publisher for rotated Lidar

asked 2022-03-03 14:23:35 -0500

chm007 gravatar image

HI All,

I am a bit new to this. I have a robot with the scanner (RPLIDAR) located at the center of the the robot base, but it is rotated 90 degrees about axis z . What should I set the qw value for my static transform, its it needed? In the example I saw it set to 1 ? I tried below but it does not reflect the proper 90 degree rotation in rviz.

node pkg="tf2_ros" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 1.571 1 base_robot base_laser"

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-03-03 18:08:48 -0500

Mike Scheutzow gravatar image

You don't have to use quaternion notation for a static_transform_publisher, because it accepts yaw-pitch-roll in radians.

Beware! Euler angles are usually r-p-y in ros, but for this particular node the developers did it y-p-r.

So if you are looking down at the robot from above, and if your lidar is rotated 90 degrees counterclockwise from the robot's x-axis, then the y-p-r angles (in radians) are:

1.571 0 0

edit flag offensive delete link more

Comments

@ Mike Thank you will try that. I was reading the TF example and saw they had quanternion notation. I will try it using y-p-r and report back here. Thanks again.

chm007 gravatar image chm007  ( 2022-03-03 19:00:46 -0500 )edit

@ Mike thank you this worked.

chm007 gravatar image chm007  ( 2022-03-25 06:42:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-03-03 14:23:35 -0500

Seen: 368 times

Last updated: Mar 03 '22