get file location in launch file in ROS Kinetic

asked 2018-11-26 08:04:29 -0500

Tal gravatar image

I want to set a ros paramter with the full dir or full file path of the lunch-file i am running or package name.
I search over the net, and I see that in ROS Lunar there is $(dirname).
from here:
http://wiki.ros.org/roslaunch/XML

Can I get similar effect in ROS Kinetic?

<param name="foo" value="???"/>

???-this lunch file location.

Thanks for your help in advance.

edit retag flag offensive close merge delete

Comments

I search over the net, and I see that in ROS Lunar there is $(dirname). [..] Can I get similar effect in ROS Kinetic?

No. Not officially. That feature is only supported since Lunar, not Kinetic.

gvdhoorn gravatar imagegvdhoorn ( 2018-11-26 09:08:33 -0500 )edit

How I can do it not officially? work around? any other creative way?

Tal gravatar imageTal ( 2018-11-26 09:09:42 -0500 )edit

It might work to try and build roslaunch from source on your Kinetic installation. I would go for the Melodic version in that case.

But there are no guarantees, as roslaunch may have diverged such between Kinetic and Melodic that it won't work.

gvdhoorn gravatar imagegvdhoorn ( 2018-11-26 09:27:45 -0500 )edit