Ask Your Question
0

How to get type information about running action server? [closed]

asked 2016-11-11 02:38:46 -0500

vivitter gravatar image

Hi, I am new to ROS. I have finished tutorials and I understand how to create simple action server & client.

Next, I would like to know how to get type information about running action server. For example, if you want to send a new goal with an action client, you will write as follows.

client = actionlib.SimpleActionClient('move_base', MoveBaseAction)
goal = MoveBaseGoal()
...Set goal parameter
client.send_goal(goal)

To write this code, users have to know that "move_base" requires MoveBaseAction and MoveBaseGoal.
Of course, I can learn the dependency from Wiki page. But, are there any other smart way to get these dependency information from running action server?

Thanks a lot for your attention!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by vivitter
close date 2016-11-11 05:56:01.242318

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-11-11 04:37:15 -0500

rbbg gravatar image

updated 2016-11-11 06:48:50 -0500

Hi,

Currently, as can be read in this question, there is no simple way to list the action servers. Running rostopic list | grep feedback as suggested, you can see the ones that are running. (every action server broadcasts a goal, results, feedback, status and cancel topic)

When the move group is running, rostopic list | grep feedback will return at least:

/move_group/feedback
/pickup/feedback
/place/feedback

Then you can use rostopic info to find the type of these topics. for instance: rostopic info /move_group/feedback returns:

Type: moveit_msgs/MoveGroupActionFeedback

As a last step you can run rosmsg show moveit_msgs/MoveGroupAction to get the full message definition (rosmsg show moveit_msgs/MoveGroupActionFeedback will only show the feedback part). As it is the completely expanded tree of the message it is quite long and I won't post it here, but you get the idea.

All in all, I find looking at the message definition in the message definition easier, but this will also work.

edit flag offensive delete link more

Comments

Hi, rbbg. Thank you very much for your help! I am very sorry for the duplicate question.

I think such a demand is very common. I hope more simple API will be released in the future. I will consider how to implement it.

vivitter gravatar image vivitter  ( 2016-11-11 05:55:05 -0500 )edit

Question Tools

Stats

Asked: 2016-11-11 02:38:46 -0500

Seen: 1,087 times

Last updated: Nov 11 '16