# static transformer question

Hi I am trying to build a map using slam. I am using Arduino due and Ros indigo, I am capable of building map with few error I have this line in my launch file:

node pkg="tf" type="static_transform_publisher" name="base_to_kinect_broadcaster" args="-0.17 0.04 0.1975 0 0 0 \/base_link \/camera_link 100" />


I need to know if this line is necessary and what the parameter after the arg= mean and how to tune them. this is my main question.

I hope any one can replay with good answer I just need explanation and how to tune the parameter and what exactly this parameter mean.

edit retag close merge delete

Also: not sure whether you added them for the forum, but remove the backslashes (\), they're not needed (nor valid).

( 2017-01-28 05:43:13 -0500 )edit

Sort by » oldest newest most voted

Quoting tf - ROS,

static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms

Publish a static coordinate transform to tf using an x/y/z offset in meters and yaw/pitch/roll in radians. (yaw is rotation about Z, pitch is rotation about Y, and roll is rotation about X). The period, in milliseconds, specifies how often to send a transform. 100ms (10hz) is a good value.

static_transform_publisher x y z qx qy qz qw frame_id child_frame_id period_in_ms

Publish a static coordinate transform to tf using an x/y/z offset in meters and quaternion. The period, in milliseconds, specifies how often to send a transform. 100ms (10hz) is a good value.

To answer your question : The coordinate systems of your camera and base link are different. Each camera image needs to be transformed into the global coordinate system. This transformation happens via the base_link frame. If you run

rosrun tf view_frames


you will see the frames in your system.

To set the arg values properly, identify your base_link coordinate system origin and the camera coordinate system origin, measure the transformation and rotation between the two systems and update x,y,z, roll, pitch, yaw accordingly.

more

you mean that I need to identify the origin of the camera related to the base link or related to the ground and is x mean here the desired position on x related to the object or mean something else.i am sry if my question is stupid but just to clear thing for me. thanks for answer,

( 2017-01-28 06:46:27 -0500 )edit

You need to identify the origin of the camera wrt to the base_link. So (x,y,z) is the origin of the camera's coordinate system in base_link coordinate system. Eg: If (0,0,0) in camera's coordinate system is (10,-2,5.5) in the base_link coordinate system, then (x,y,z) is (10,-2,5.5). Same with r,p,y

( 2017-01-28 10:30:50 -0500 )edit