rosservice call syncing service starts
I am trying to get a brushed motor differential drive robot to drive straight without encoders. I am controlling the motors by a RC style ESC (PWM) that takes a servo signal. I can control the motors with 'rosservice call /service 1 2' (1 is the servo ID, 2 is the speed) The problem is when I write a shell script, one motor takes about a full second to start after the other. I am not sure if the service call can support multiple devices from the CLI. I am unclear of the syntax needed if this indeed is possible.
Is there any way to get rosservice call to sync so the motors stop and start at the same time.
(Yes, I know I should be using PID, twist and cmd_vel, but I just need to get the darn thing driving straight first!)
Thank you.
Focussing on your question, how about creating another service which takes as
request
fields the speed of both motors (a bit of a hack, I know)? ROS services are intrinsically asynchronous.