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

high-performance status checking

asked 2017-06-09 09:55:12 -0500

achille gravatar image

Each time I read and write from and to the servos in my symmetric robot, I want to check a mode that determines which servos to talk to (the frames of this robot can change while it's running). Because the reading and writing happens continuously through topics, I want to make sure this checking adds as little overhead as possible.

I considered two solutions: services and a parameter server. From what I understand, services seem to be able to do this quickly, but it looks like they can't deliver a different response, as when the mode changes. A Parameter Server can do the trick, but the wiki explicitly states that it's not meant for high-performance and dynamic data. Are there any other solutions or am I overestimating the overhead with the parameter server?

edit retag flag offensive close merge delete

Comments

Are you able to structure the service file such that it only returns information in a single field (string, int32)? I.E. the service function is to return what mode a servo is in. Then the service client could track the mode of each servo over time, and detect changes.

maxsvetlik gravatar image maxsvetlik  ( 2017-06-09 14:36:39 -0500 )edit

So would this be what you mean?: Before reading and writing to the servos, you send a service request to a topic 'mode', which just returns a single field. When some file wants to change the mode, it publishes to that topic 'mode' to change it.

achille gravatar image achille  ( 2017-06-10 11:34:17 -0500 )edit

Yes thats the idea. You may want to make the 'mode change' type action a service also, depending on your application. Since services are blocking, sending a service call would ensure the servo is in the desired mode before additional reading/writing.

maxsvetlik gravatar image maxsvetlik  ( 2017-06-10 16:09:14 -0500 )edit

Ok, so (how) does the topic store the actual value of the mode? And how does the service call to change the mode affect it? By publishing to it once? Perhaps you could summarize and write this up so I can accept your answer. Thanks

achille gravatar image achille  ( 2017-06-10 16:35:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-11 02:46:09 -0500

NEngelhard gravatar image

updated 2017-06-11 08:10:51 -0500

How often does your configuration change? And how is this change triggered? Checking the configuration for each command sounds like a wrong architecture to me. There is probably some kind of high level planner that decides when to use which side as base and which as actuator (I imagine some kind of snake-robot, do you have images?). This planner could then send a new configuration to the planners that will control the base-part and the actuator-part.

tl;dr: This sounds like a xy-problem

edit flag offensive delete link more

Comments

Also: if this is basically 'status'-like info, then a topic on which this 'mode' is broadcast would seem more appropriate.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-11 05:25:54 -0500 )edit

This video shows a similar design. Gripping a pole and opening the base-gripper would induce a change of mode.

achille gravatar image achille  ( 2017-06-11 09:09:52 -0500 )edit

If a service (called by the high-level planner) would change the mode on the topic, is there a way a change could be detected and pushed to the read/write file instead of checking each time you read/write?

achille gravatar image achille  ( 2017-06-11 09:10:51 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-06-09 09:55:12 -0500

Seen: 308 times

Last updated: Jun 11 '17