Ask Your Question

How launch a python script with roslaunch

asked 2016-03-22 04:45:14 -0600

mohsen1989m gravatar image

Hello there,

I am trying to launch a script called from a package called xsens_drive. When I use rosrun it works perfectly, however i have difficulty to launch it with roslaunch. This is the syntax that I use:

  <node pkg="xsens_drive" name="" type="" output="screen">
        <param name="frame_id" value="base_link" />

and this is the warning and error form the roslaunch:

WARNING: WARN: illegal <node> name ''.
This will likely cause problems with other ROS tools.
Node xml is <node name="" output="screen" pkg="xsens_drive" type="">
        <param name="frame_id" value="base_link"/>

and the error:

ERROR: cannot launch node of type [xsens_drive/]: xsens_drive
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/sherpa/catkin_ws/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks

I tried different combination of name and type without .py with no luck, I am using ros indigo

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-22 04:54:20 -0600

gvdhoorn gravatar image
<node pkg="xsens_drive" name="" type="" output="screen">

I think the package is actually called xsens_driver, so the following should work:

<node pkg="xsens_driver" name="mtnode" type="" output="screen"> 

The type for a Python script is always just the script itself. The name can be anything, but must follow the ROS naming conventions.

edit flag offensive delete link more



Thanks, yep that was a stupid mistake of mine...

mohsen1989m gravatar imagemohsen1989m ( 2016-04-07 08:08:20 -0600 )edit

This was useful, Thankyou !

Haresh Karnan gravatar imageHaresh Karnan ( 2018-02-26 00:09:27 -0600 )edit

I did the same mistake, thank you!

meterix gravatar imagemeterix ( 2018-06-11 16:53:07 -0600 )edit

In my case (Kinetic), the node name was not sufficient, I had to specify

Avio gravatar imageAvio ( 2018-06-29 11:05:58 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-03-22 04:45:14 -0600

Seen: 21,269 times

Last updated: Mar 22 '16