Ask Your Question
0

problem with tilde in .launch file in kinetic ros

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

arminkazim7 gravatar image

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

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 -0600

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 imagearminkazim7 ( 2019-02-20 06:00:10 -0600 )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 imagegvdhoorn ( 2019-02-20 06:13:36 -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

Stats

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

Seen: 25 times

Last updated: Feb 20