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

How properly install audio_common package?

asked 2018-05-31 05:05:44 -0600

tolga-uni-lu gravatar image

Hello, My ros package uses audio_common package and even though I installed it with the command: sudo apt-get install ros-kinetic-audio_common I keep getting below warnings about soundplay.py. Please ignore the error in my log as it is another story.

odroid@QT05:~$ roslaunch rehabilitation_framework Exercise_Launcher.launch 
WARNING: Package name "robAPL" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
... logging to /home/odroid/.ros/log/a2e6ab5a-64a4-11e8-b054-6dc2e0f8cf5e/roslaunch-QT05-16257.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.100.1:38145/
SUMMARY
========
PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
NODES
  /
    rehabilitation_framework (rehabilitation_framework/Exercises.py)
    sound_play (sound_play/soundplay_node.py)
    wm_voice_generator (wm_voice_generator/wm_voice_component_short.py)
ROS_MASTER_URI=http://192.168.100.1:11311/
WARNING: Package name "robAPL" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robAPL" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[sound_play-1]: started with pid [16274]
process[wm_voice_generator-2]: started with pid [16275]
process[rehabilitation_framework-3]: started with pid [16276]
Traceback (most recent call last):
  File "/home/odroid/catkin_ws.tolga/src/rehabilitation_framework-working_demo_with_gui/src/Exercises.py", line 856, in <module>
    ros_motion_type = rosparam.get_param("/reha_exercise/motion_type")
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 214, in get_param
    return get_param_server().getParam(param)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 206, in getParam
    return self._succeed(self.handle.getParam(self.caller_id, key))
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 154, in _succeed
    raise Error(msg)
rosgraph.masterapi.MasterError: Parameter [/reha_exercise/motion_type] is not set
================================================================================REQUIRED process [rehabilitation_framework-3] has died!
process has died [pid 16276, exit code 1, cmd /home/odroid/catkin_ws.tolga/src/rehabilitation_framework-working_demo_with_gui/src/Exercises.py __name:=rehabilitation_framework __log:=/home/odroid/.ros/log/a2e6ab5a-64a4-11e8-b054-6dc2e0f8cf5e/rehabilitation_framework-3.log].
log file: /home/odroid/.ros/log/a2e6ab5a-64a4-11e8-b054-6dc2e0f8cf5e/rehabilitation_framework-3*.log
Initiating shutdown!
================================================================================
[rehabilitation_framework-3] killing on exit
[wm_voice_generator-2] killing on exit
[sound_play-1] killing on exit
[WARN] [1527752949.115161]: Sound command issued, but no node is subscribed to the topic. Perhaps you forgot to run soundplay_node.py?
[WARN] [1527752950.116654]: Sound command issued, but no node is subscribed to the topic. Perhaps you forgot to run soundplay_node.py?
shutting down processing monitor...
... shutting down processing monitor complete
done
odroid@QT05:~$
edit retag flag offensive close merge delete

Comments

Which warnings are you referring to here? I see a nr of them, and some of them are harmless (the naming convention one) and others are perfectly explainable (the ones about "no node subscribed": sound_play shut down just before that).

Please clarify.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-31 05:33:42 -0600 )edit

It looks like the other errors in your launch file are causing premature shutdown of the sound_play node, which is causing the sound_play errors.

ahendrix gravatar image ahendrix  ( 2018-05-31 15:34:03 -0600 )edit

These warnings:

[WARN] [1527752949.115161]: Sound command issued, but no node is subscribed to the topic. Perhaps you forgot to run soundplay_node.py?
[WARN] [1527752950.116654]: Sound command issued, but no node is subscribed to the topic. Perhaps you forgot to run soundplay_node.py?
tolga-uni-lu gravatar image tolga-uni-lu  ( 2018-06-01 02:33:02 -0600 )edit

Well, looking a few lines up from those lines, you can see:

[sound_play-1] killing on exit

so the sound_play node already exited. The warning seems correct: it is not running any longer.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-01 03:01:02 -0600 )edit

I see, so the problem is that it exits even though it is not told so.

tolga-uni-lu gravatar image tolga-uni-lu  ( 2018-06-01 03:17:07 -0600 )edit

The sound_play node exits because roslaunch terminates it. roslaunch shuts down because your node crashed: ================================================================================REQUIRED process [rehabilitation_framework-3] has died!

ahendrix gravatar image ahendrix  ( 2018-06-01 03:33:01 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-06-01 03:30:27 -0600

gvdhoorn gravatar image

There is most likely no problem with sound_play and / or audio_common.

I see, so the problem is that it exits even though it is not told so.

According to the console output you show, it is actually told to shutdown:

Traceback (most recent call last):
  File "/home/odroid/catkin_ws.tolga/src/rehabilitation_framework-working_demo_with_gui/src/Exercises.py", line 856, in <module>
    ros_motion_type = rosparam.get_param("/reha_exercise/motion_type")
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 214, in get_param
    return get_param_server().getParam(param)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 206, in getParam
    return self._succeed(self.handle.getParam(self.caller_id, key))
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 154, in _succeed
    raise Error(msg)
rosgraph.masterapi.MasterError: Parameter [/reha_exercise/motion_type] is not set
================================================================================
REQUIRED process [rehabilitation_framework-3] has died!

Because rehabilitation_framework-3 dies, and is set as required in your launch file, roslaunch will start shutting down all the other nodes. That would include your sound_play node.

So the real issue here is: why does rehabilitation_framework shut down?

Probably because of:

rosgraph.masterapi.MasterError: Parameter [/reha_exercise/motion_type] is not set

I don't know anything about this software, so I can't help you there, but the error should be on line 856 in /home/odroid/catkin_ws.tolga/src/rehabilitation_framework-working_demo_with_gui/src/Exercises.py, which is:

ros_motion_type = rosparam.get_param("/reha_exercise/motion_type")

Are you starting everything correctly? Is the launch file setting that parameter? If not, that is what the problem is.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-31 05:05:44 -0600

Seen: 388 times

Last updated: Jun 01 '18