0
$\begingroup$

Rosanswers logo

**

Usage: static_transform_publisher x y z qx qy qz qw frame_id child_frame_id  period(milliseconds) 
This transform is the transform of the coordinate frame from frame_id into the coordinate frame 
of the child_frame_id.  
[ERROR] [1380079370.694111859]: static_transform_publisher exited due to not having the right number of arguments

**

Here's the problem when I tried to confirm whether my static_transform_publisher is running.

I have tried out to 'roslaunch kinect_frames.launch' with 'rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 1 base_link base_scan 100' running on another terminal (just simply fill in some argument). Here's the output.

... logging to /home/user/.ros/log/590fda42-2a34-11e3-8212-0022fb8421da/roslaunch-ubuntu-3072.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:32821/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES
  /
    camera_base_link (tf/static_transform_publisher)
    camera_base_link1 (tf/static_transform_publisher)
    camera_base_link2 (tf/static_transform_publisher)
    camera_base_link3 (tf/static_transform_publisher)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete

Originally posted by FuerteNewbie on ROS Answers with karma: 123 on 2013-09-24

Post score: 3


Original comments

Comment by jarvisschultz on 2013-09-25:
Just FYI, if the args have 6 numbers then 2 strings then 1 more number the first 6 are interpreted as x,y,z,y,p,r i.e. orientation parameterized by yaw, pitch, roll. If you use 7 numbers the orientation is parameterized with a quaternion i.e. args are x,y,z,qx,qy,qz,qw.

Comment by DamienJadeDuff on 2013-09-26:
Thanks for the correction jarviscchultz. FuerteNewbie, we would still need to see the command line you gave to get this output.

Comment by FuerteNewbie on 2013-09-26:
rosrun tf static_transform_publisher

Comment by jarvisschultz on 2013-09-27:
Well if that is the exact command you used to generate the posted error, then I believe the error is very clear. As myself and @DamienJadeDuff pointed out, the static_transform_publisher requires 10 (or 9) arguments, and it appears as if you didn't provide them. Does this resolve your problem?

Comment by FuerteNewbie on 2013-09-29:
It don't really solve but at least I get to understand something. Anyway does static_transform_publisher work on simulator? I guess the simulator itself define the robot x y z yaw pitch roll already.

Comment by jarvisschultz on 2013-09-30:
I don't understand your question about the it working on simulator? The static_transform_publisher does one simple task; at some desired frequency, it broadcasts a constant transform between two constant frames. An example of this can be seen in kinect_frames.launch file in openni_launch

Comment by FuerteNewbie on 2013-10-01:
@jarvisschultz I have update my output from roslaunch kinect_frames.launch, it doesn't seems working right.

Comment by FuerteNewbie on 2013-10-01:
@jarvisschultz I have update my output from roslaunch kinect_frames.launch, it doesn't seems working right.

Comment by DamienJadeDuff on 2013-10-02:
The comment in the other question was asking you to try running static_transform_publisher using rosrun to see if that works. Accordingly we can discover the cause of the problem. Apparently it works. The intention was never to run it together with the roslaunch.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Can you please provide the command that you used to get this output? Did you give ALL the values required on the command line?

There should be 7 numbers then 2 strings then 1 more number. e.g.

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 1.0 base_link map 1000

OR 6 numbers then 2 strings then 1 more number. e.g.

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 base_link map 1000 

(incorporating the suggestion from jarvisschultz).


Originally posted by DamienJadeDuff with karma: 399 on 2013-09-24

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by FuerteNewbie on 2013-09-29:
I just simply rosrun tf static_transform_publisher

Comment by Athoesen on 2014-02-21:
rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 1.0 base_link map 1000

The tutorial doesn't list the tf part in the command line code, thank you for this!

Comment by Jägermeister on 2019-07-15:
What are base_link and map? Which one is the parent? Could you edit the code in a way that we also see the hierarchy?

Comment by DamienJadeDuff on 2019-08-24:
@Jägermeister https://wiki.ros.org/tf#static_transform_publisher base_link and map are common TF frames.

$\endgroup$

Your Answer

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