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

Failed to rosrun static tf publisher

asked 2013-09-24 17:28:09 -0500

FuerteNewbie gravatar image

updated 2013-11-18 19:19:32 -0500

tfoote gravatar image

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 <a href="http://ubuntu:32821/">http://ubuntu:32821/</a>

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
edit retag flag offensive close merge delete

Comments

2

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.

jarvisschultz gravatar image jarvisschultz  ( 2013-09-25 07:34:41 -0500 )edit

Thanks for the correction jarviscchultz. FuerteNewbie, we would still need to see the command line you gave to get this output.

DamienJadeDuff gravatar image DamienJadeDuff  ( 2013-09-26 18:54:46 -0500 )edit
1

rosrun tf static_transform_publisher

FuerteNewbie gravatar image FuerteNewbie  ( 2013-09-26 22:14:34 -0500 )edit
1

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?

jarvisschultz gravatar image jarvisschultz  ( 2013-09-27 02:38:09 -0500 )edit
1

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.

FuerteNewbie gravatar image FuerteNewbie  ( 2013-09-29 15:50:25 -0500 )edit

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

jarvisschultz gravatar image jarvisschultz  ( 2013-09-30 06:12:49 -0500 )edit

@jarvisschultz I have update my output from roslaunch kinect_frames.launch, it doesn't seems working right.

FuerteNewbie gravatar image FuerteNewbie  ( 2013-10-01 15:53:11 -0500 )edit

@jarvisschultz I have update my output from roslaunch kinect_frames.launch, it doesn't seems working right.

FuerteNewbie gravatar image FuerteNewbie  ( 2013-10-01 15:53:12 -0500 )edit

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.

DamienJadeDuff gravatar image DamienJadeDuff  ( 2013-10-02 02:51:51 -0500 )edit

1 Answer

Sort by » oldest newest most voted
7

answered 2013-09-24 21:29:18 -0500

DamienJadeDuff gravatar image

updated 2014-03-04 00:47:09 -0500

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).

edit flag offensive delete link more

Comments

I just simply rosrun tf static_transform_publisher

FuerteNewbie gravatar image FuerteNewbie  ( 2013-09-29 15:52:52 -0500 )edit

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!

Athoesen gravatar image Athoesen  ( 2014-02-21 05:03:05 -0500 )edit

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?

Jägermeister gravatar image Jägermeister  ( 2019-07-15 03:42:07 -0500 )edit

@Jägermeisterhttps://wiki.ros.org/tf#static_transf... base_link and map are common TF frames.

DamienJadeDuff gravatar image DamienJadeDuff  ( 2019-08-24 10:34:08 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-09-24 17:28:09 -0500

Seen: 17,332 times

Last updated: Mar 04 '14