Ask Your Question
0

Subscribing to action servers' feedback topic

asked 2011-04-27 23:44:57 -0600

Homer Manalo gravatar image

I have some action servers which will run sequentially through smach. I will have a launch file that simultaneously launches these action servers. These action servers will publish a common feedback topic say motor_velocity. If I am not mistaken the topic is published as '/action_server_name/feedback/motor_velocity'. How do I subscribe to that topic without knowing which state is running? The current state that is run by smach should be the server that the subscriber should get the motor_velocity.

  • Can I just subscribe to '/feedback/motor_velocity'? Since I launched the servers simultaneously aren't they simultaneously publishing it and may just cause confusion?
  • Is it possible to remap the feedback topic?
  • What is a better way of doing this?
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-04-28 18:37:50 -0600

vpradeep gravatar image

Feedback is published on the feedback topic inside the action's namespace. You never get to pick the feedback's topic name.

actionlib is not designed to have two action servers publishing to the same namespace:
- If both servers use the same action type, then it becomes ambiguous as to which server will execute the goal.
- If both servers use different action types, then there will be lots of MD5sum errors due to multiple message types publishing and subscribing to the same topics

My suggestion would be to create your own motor_velocity topic outside of the action definition. This gives you lots of flexibility, and lets all of your action servers publish motor_velocity on the same topic.

edit flag offensive delete link more
0

answered 2011-04-28 18:11:39 -0600

tfoote gravatar image
  • '/feedback/motor_velocity' will never find publishers on '/action_server_name/feedback/motor_velocity' The order of startup has no bearing on the published topic.
  • You can remap the feedback topic
  • If you want to recieve multiple topics on one I suggest that you look at the mux node.
edit flag offensive delete link more

Comments

if I use mux node what would be the fieldname of the output topic? I assume that the fieldtype is the same as what the input topic is.
Homer Manalo gravatar imageHomer Manalo ( 2011-05-03 18:45:49 -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: 2011-04-27 23:44:57 -0600

Seen: 1,149 times

Last updated: Apr 28 '11