0
$\begingroup$

Rosanswers logo

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?


Originally posted by achille on ROS Answers with karma: 464 on 2017-06-09

Post score: 0


Original comments

Comment by maxsvetlik on 2017-06-09:
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.

Comment by achille on 2017-06-10:
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.

Comment by maxsvetlik on 2017-06-10:
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.

Comment by achille on 2017-06-10:
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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by NEngelhard with karma: 3519 on 2017-06-11

This answer was ACCEPTED on the original site

Post score: 0


Original comments

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

Comment by achille on 2017-06-11:
This video shows a similar design. Gripping a pole and opening the base-gripper would induce a change of mode.

Comment by achille on 2017-06-11:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.