0
$\begingroup$

Rosanswers logo

ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]

I am doing amcl laser scan on stage simulator and I've got this error when I try to roslaunch my .launch file.

Here's my launch file. ( I split it into two .launch file)

stage_simulate.launch

<launch>
  <master auto="start"/>
  <!-- Run the map server -->
  <!-- <node name="map_server" pkg="map_server" type="map_server" />-->
  <!--<node name="map_server" pkg="map_server" type="map_server" args="$(find my_map_package)/mymap.yaml"/>--> 
   <!--- Run AMCL -->
  <!-- <include file="$(find amcl)/examples/amcl_omni.launch" /> -->
  <!--- stage world -->
    <node pkg="stage" type="stageros" name="stage" cwd="node" args="/home/user/fuerte_workspace/sandbox/worldmap/willow-four-erratics.world" respawn="false" output="screen">
  </node>
  <!--- dynamic_reconfigure -->
  <node pkg="dynamic_reconfigure" type="reconfigure_gui" respawn="false" name="reconfigure_gui" output="screen"/>
</launch>

stage_split.launch

<launch>
  <master auto="start"/>
 <!--- rviz -->
  <node pkg="rviz" type="rviz" respawn="false" name="rviz" args="/home/user/fuerte_workspace/sandbox/worldmap/display_config.vcg" output="screen"/>
<node pkg="tf" type="static_transform_publisher" name="tf_broadcaster" args="1 0 0 0 0 0 base_link base_scan 100" />
</launch>

Output from stage_simulate.launch

... logging to /home/user/.ros/log/94773422-264c-11e3-9636-0022fb8421da/roslaunch-ubuntu-3214.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.

WARNING: ignoring defunct <master /> tag
started roslaunch server htp://ubuntu:35981/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES
  /
    reconfigure_gui (dynamic_reconfigure/reconfigure_gui)
    stage (stage/stageros)

ROS_MASTER_URI=htp://localhost:11311

core service [/rosout] found
process[stage-1]: started with pid [3234]
process[reconfigure_gui-2]: started with pid [3235]
 [Loading /home/user/fuerte_workspace/sandbox/worldmap/willow-four-erratics.world][Image "willow-full.pgm"]
[ INFO] [1380159864.910827049]: found 1 position/laser pair in the file
reconfigure_gui started

Output of stage_split.launch

... logging to /home/user/.ros/log/94773422-264c-11e3-9636-0022fb8421da/roslaunch-ubuntu-3581.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.

WARNING: ignoring defunct <master /> tag
started roslaunch server htp://ubuntu:33620/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES
  /
    rviz (rviz/rviz)
    tf_broadcaster (tf/static_transform_publisher)

ROS_MASTER_URI=htp://localhost:11311

core service [/rosout] found
process[rviz-1]: started with pid [3607]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
[ INFO] [1380159895.148350411]: rviz revision number 1.8.17
[ INFO] [1380159895.148487370]: compiled against OGRE version 1.7.3 (Cthugha)
[ INFO] [1380159895.278180259]: Loading general config from [/home/user/.rviz/config]
[ INFO] [1380159896.729459922, 31.700000000]: Texture for pass 0: creating with size 1 x 1
[ INFO] [1380159896.730790120, 31.700000000]: Texture for pass 1: creating with size 1 x 1
[ WARN] [1380159897.604848196, 32.500000000]: Message from [/stage] has a non-fully-qualified frame_id [base_laser_link]. Resolved locally to [/base_laser_link].  This is will likely not work in multi-robot systems.  This message will only print once.
[ WARN] [1380160015.008231130, 149.900000000]: Message from [/stage] has a non-fully-qualified frame_id [base_laser_link]. Resolved locally to [/base_laser_link].  This is will likely not work in multi-robot systems.  This message will only print once.
[ WARN] [1380160057.864622087, 192.800000000]: Message from [/amcl] has a non-fully-qualified frame_id [map]. Resolved locally to [/map].  This is will likely not work in multi-robot systems.  This message will only print once.
[ INFO] [1380160065.010482674, 200.000000000]: Setting pose: 22.655 12.758 1.481 [frame=/map]

Output of env|grep ROS

ROS_ROOT=/opt/ros/fuerte/share/ros
ROSLISP_PACKAGE_DIRECTORY=/opt/ros/fuerte/share/common-lisp/ros
ROS_PACKAGE_PATH=/home/user/fuerte_workspace:/opt/ros/fuerte/stacks:/opt/ros/fuerte/lib:/opt/ros/fuerte/share
ROS_MASTER_URI=htp://localhost:11311
ROS_DISTRO=fuerte
ROS_ETC_DIR=/opt/ros/fuerte/etc/ros

env|grep PATH

ROS_PACKAGE_PATH=/home/user/fuerte_workspace:/opt/ros/fuerte/stacks:/opt/ros/fuerte/lib:/opt/ros/fuerte/share
LD_LIBRARY_PATH=/opt/ros/fuerte/lib:
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
PATH=/opt/ros/fuerte/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path

Output of find /opt/ros/fuerte/ -name "static_transform_publisher" -exec ls -l {} ;

-rwxr-xr-x 1 root root 298093 May  3 08:51 /opt/ros/fuerte/stacks/geometry_experimental/tf2_ros/bin/static_transform_publisher
-rwxr-xr-x 1 root root 383840 May  3 04:25 /opt/ros/fuerte/stacks/geometry/tf/bin/static_transform_publisher

Output of roscd tf ; ls -l bin |grep static

-rwxr-xr-x 1 root root  383840 May  3 04:25 static_transform_publisher

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

Post score: 1


Original comments

Comment by jarvisschultz on 2013-09-24:
I don't see anything wrong with the syntax of your launch file. What version of ROS are you on? Do you have tf properly installed? What happens if you execute rosrun tf static_transform_publisher 1 0 0 0 0 0 base_link base_scan 100?

Comment by FuerteNewbie on 2013-09-24:
I am using fuerte. Nothing actually happen. Another problem happened when I launch the second .launch file. [ WARN] [1380074027.654405625]: Message from [/stage] has a non-fully-qualified frame_id [base_laser_link]. Resolved locally to [/base_laser_link]. This is will likely not work in multi-robot systems. This message will only print once.

Comment by DamienJadeDuff on 2013-09-24:
Do you mean nothing happens when you try rosrun tf static_transform_publisher 1 0 0 0 0 0 base_link base_scan 100? No output at all? Just return to the prompt? (note: the number of parameters in that rosrun command is wrong. You need another number before base_link as a quaternion is 4 numbers).

Comment by FuerteNewbie on 2013-09-24:
No return to the prompt, I must Ctrl+C to stop it even though there is nothing. How is it suppose to be like? I actually refer to tf tutorial of ROS. Quaternion is something like 0 0 0 1?

Comment by dornhege on 2013-09-24:
Actually 3 arguments for rotation is OK. In that case it interprets those as euler angles.

Comment by DamienJadeDuff on 2013-09-25:
No output to the screen is the behaviour when it is working successfully. It shouldn't put output to the screen; instead it publishes to the /tf topic. You can see if the transform is broadcasting by typing rosrun tf view_frames or suchlike in another terminal. Thanks for the correction dornhege.

Comment by DamienJadeDuff on 2013-09-25:
So the rosrun command seems to be working but not the roslaunch. This may help others help you: give the output of env|grep ROS and env|grep PATH. Also do give the full command you use to launch the roslaunch file and its full output. You can edit the question and add it to the bottom.

Comment by dornhege on 2013-09-25:
Does the rviz node in the same launch come up?

Comment by FuerteNewbie on 2013-09-25:
Due to my karma I can't post link so the http has been reduced to htp. Hope understand.

Comment by FuerteNewbie on 2013-09-25:
@dornhege yes it does.

Comment by dornhege on 2013-09-25:
This seems really odd to me. If you launch view_frames instead of the static_transform_publisher does that work?

Comment by DamienJadeDuff on 2013-09-26:
Also, what is the output of the following commands: find /opt/ros/fuerte/ -name "static_transform_publisher" -exec ls -l \{} \; and roscd tf ; ls -l bin |grep static - maybe it got moved? Both commands should find the executable and get some information about it.

Comment by FuerteNewbie on 2013-09-26:
I have updated the output.

Comment by dornhege on 2013-09-26:
What is rospack find tf for you?

Comment by dornhege on 2013-09-26:
And just to be sure, can you do source /opt/ros/fuerte/setup.bash before you start the launch file to make sure there is a clean setup.

Comment by FuerteNewbie on 2013-09-26:
/opt/ros/fuerte/stacks/geometry/tf

Comment by DamienJadeDuff on 2013-10-02:
To be clear, we seem to have established that rospack, rosrun both find tf and static_transform_publisher is in the right place. It seems to have the right permissions. It is a bit of a mystery why it is not working in your launch file as the launch file seems right.

Comment by DamienJadeDuff on 2013-10-02:
Perhaps you can for now just continue to use the rosrun command to run the static_transform_publisher and remove that part of the roslaunch file? As the <node pkg="tf..../> part of the launch file and the 1rosrun tf static_transform_pub...` do the same thing.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This might be one, suboptimal, answer for you. Check out the following question:

roslaunch error

The user fixed it by recreating the package in question and copying appropriate files across. They never tracked down the real cause of the problem.

Actually if this answer works for you (don't forget to make the backups!) then you'd probably be doing the community a service if you explored what the problematic difference is between the failing package and the recreated one (by using a backup of the problematic package and reintroducing its differences one by one). Things to pay particular attention to are file permissions, hidden and configuration files, different file contents.


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

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by DamienJadeDuff on 2013-10-02:
If you just want to get the transform in the launch file running, then running the rosrun command like this would be enough: rosrun tf static_transform_publisher 1 0 0 0 0 0 base_link base_scan 100.

Comment by DamienJadeDuff on 2013-10-02:
Check that this works by calling rosrun tf view_frames in another terminal and look at the PDF file. There should be a link between base_link and base_scan. This way you wouldn't need to fix the launch file problem (though you should probably do that too).

$\endgroup$

Your Answer

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