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

problem with tilde in .launch file in kinetic ros

asked 2019-02-20 04:51:29 -0500

arminkazim7 gravatar image

updated 2019-02-20 06:15:11 -0500

Hello it seems like when i give an argument inside a .launch file and it contains a tilde character this character is not recognized properly and does not get converted to /home/username/.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-02-20 05:51:36 -0500

gvdhoorn gravatar image

a tilde character this character is not recognized properly and does not get converted to /home/username/.

the problem is that you're assuming this is a generic bit of functionality or behaviour ("in Linux"), but it's actually bash that substitutes /home/username for things like ~ and $HOME.

roslaunch does not do this, or at least not in the way you're currently using it.

You could consider using the env substitution arg for this specific case (with $HOME).

edit flag offensive delete link more

Comments

Thanks a lot for your answer i got that point. So here is the solution <env name="HOME" value="/home/username"/> <...args="$(env HOME)..." />

arminkazim7 gravatar image arminkazim7  ( 2019-02-20 06:00:10 -0500 )edit

It should not be necessary to set HOME yourself.

In fact, from the documentation on env:

NOTE: Values set using the <env> tag will not be seen by $(env ...)

gvdhoorn gravatar image gvdhoorn  ( 2019-02-20 06:13:36 -0500 )edit

Question Tools

Stats

Asked: 2019-02-20 04:51:29 -0500

Seen: 170 times

Last updated: Feb 20 '19