rosservice call in bash causing issues
Hi,
I am trying to use bash to execute a bunch of rosservice calls, one after the other. Some work but the ones that ask for position ones don't:
rosservice call /wam/cart_move "position:
- 0
- 0
- 0.5"
They work if I put them in terminal no problem, but I cannot bash call them.. Any suggestions as to why this my be the case?
Update: 21 Jan - @Wolf saved the day - had to include sleep command to allow the service to run.. Thank you ros answers!
How does your script file look like? What is the error messsage? I can call rosservice from a bash shell script without problems. Did you select bash (# !/bin/bash ) at top of your script?
It's a typical .sh script: #! /bin/bash rosservice call /bhand/open_spread rosservice call /wam/cart_move "position: - 0 - 0 - 0.5" rosservice call /wam/cart_move "position: - 0.87 - -0.15 - -0.45"
What type of service is that?
wam/cart_move - type wam_srvs/CartPosMove; float32[3] position ---; (http://code.google.com/p/gwam-ros-pkg/wiki/GWAMPackagewam_node); (http://code.google.com/p/gwam-ros-pkg/source/browse/trunk/wam/wam_common/wam_srvs/srv/CartPosMove.srv?spec=svn203&r=86)
What kind of error do you get?
I dont get an error - this runs without a problem - but does not execute all the command (specifically the service call to /wam/cart_move)