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

sound_play action client c++

asked 2017-07-17 12:25:58 -0500

dottant gravatar image

Hi all
Anyone knows how to use the sound_play action_lib client request c++ version?
I've see that only a python test file is available.
Thank you so much

edit retag flag offensive close merge delete


some of the examples in C++ are given here.

naveedhd gravatar image naveedhd  ( 2017-08-02 10:31:37 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-02 10:58:26 -0500

dottant gravatar image

I solved it alone because there's nothing about it on the wiki or other pages (only python)
For who will be in my same situation, I post some code snippet
Here is what is needed to be included

#include <actionlib/client/simple_action_client.h>
#include <sound_play/SoundRequestAction.h>

The definition of the Action Client

typedef actionlib::SimpleActionClient<sound_play::SoundRequestAction> SoundClientTest;

The definition of the Sound Client Goal

sound_play::SoundRequestGoal goal;

All the other things are the same as, for ex, the move base action client.
I hope this could be helpful

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-07-17 12:25:58 -0500

Seen: 281 times

Last updated: Aug 02 '17