Ask Your Question

why in sound_play package cannot be used with roslaunch?

asked 2017-08-08 03:42:10 -0600

s_mostafa_a gravatar image

updated 2017-08-08 03:46:10 -0600 works if it come with rosrun. I mean at first I have launched a launch file containing:


<node pkg="sound_play" type="" name="sound_play" output="screen"/>


(consider its name is first.launch)

and then in another terminal I have run:

rosrun mypackage

but how can I launch with a launch file? I have inside "mypackage" and a launch file(named second.launch) like this:


<node pkg="mypackage" type="" name="say" output="screen"/>


but it got some errors in the terminal in which i have launched first.luanch:

sound: -3 command: 1 volume: 1.0 arg: __name:=say arg2: __log:=/home/mostafa/.ros/log/53b70204-7c11-11e7-b929-acbc32787137/say-1.log SIOD ERROR: unbound variable : __log:=/home/mostafa/.ros/log/53b70204-7c11-11e7-b929-acbc32787137/say-1.log

and a warning in the terminal of second.launch:

Saying: __name:=say Voice: __log:=/home/mostafa/.ros/log/53b70204-7c11-11e7-b929-acbc32787137/say-1.log Volume: 1.0

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-08 08:24:03 -0600

naveedhd gravatar image

This is because script (must be written to be a standalone python script and hence) accepts sysargs. When is launched with roslaunch, addition sysargs are passed to the script and __name:=say becomes the sys.argv[1].

The solution for this is to modify the to accept rosparam.

edit flag offensive delete link more


Ed Venator gravatar imageEd Venator ( 2017-08-09 23:29:56 -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



Asked: 2017-08-08 03:42:10 -0600

Seen: 87 times

Last updated: Aug 08 '17