0
$\begingroup$

Rosanswers logo

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"


Originally posted by chm007 on ROS Answers with karma: 34 on 2022-03-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by Mike Scheutzow with karma: 4903 on 2022-03-03

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by chm007 on 2022-03-03:
@ 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.

Comment by chm007 on 2022-03-25:
@ Mike thank you this worked.

$\endgroup$

Your Answer

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