Static_transform_publisher using the command?

If I have understood things right, we don’t have to create a launch file in order to publish a transform! We can use alternatively and directly the command of the static_transform_publisher node.
Why was the command in my case not recognized from the terminal?

Hi @mouidsakka01 ,

You are supposed to replace x, y, z, yaw, pitch, roll in your command with the actual numeric values.
It is not surprising that the command did not work.

Also, you must add that line to the launch file.

If I am correct (I may not be), to launch it from command line you would do something like this:

rosrun tf static_transform_publisher x_val y_val z_val yaw_val pitch_val roll_val base_link base_laser period_hz

Refer: http://wiki.ros.org/tf#static_transform_publisher

Regards,
Girish

Hello @mouidsakka01,

as @girishkumar.kannan correctly said, to run that command you prepend rosrun tf which is the usual way to run nodes from the command line plus the name of the package, which is tf .

I added a note to the course to make this clear and also indicate that you must replace x y z yaw pitch roll frame_id child_frame_id period_in_ms with actual values:

Below is a working example that create a new frame called odom at 1 meter from the map frame in the x-axis direction.

rosrun tf static_transform_publisher 1 0 0 0 0 0 map odom 100

Hope this helps.