After configuring CSER with "rosservice call /config “command: ‘CSER’” I am able to run code to move a servo by publishing the wanted duty cycle and servo number but after a restart of the roboter I need to configure it again for it to function.
Are there any config files where I can fill in set values (these do not need to change) or do I need to change the firmware?
I am also currently running an older firmware (I think it’s v0.13.1). If this is only possible in a newer version please let me know otherwise I don’t want to change the firmware.
The simplest solution is to call this service automatically when starting ROS. For this, you can use ros launch file or write a simple shell script. The second option is to modify firmware providing custom configuration parameters for CERN.
thank you for the quick response. Starting the service in a launch file is probably the easiest but I’m having difficulty in rewriting the arguments for it to fit into the node syntax.
but since this uses both quotation marks and apostrophes, I don’t know how to use it in
<node pkg=“rosservice” type=“rosservice” name=“servo_config” args"–insert here–"/>.
Do you know of a syntax that I could use? I’ve tried using “& q u o t ;” (with spaces, so HTML doesn’t recognize it), { and } and using backslashes before the quotation marks.
Glad you solved your problem, if you still want to try using a launch file you can use arguments. Define them like this: <arg name="data" default="data: 'V:1 S:1 E:1 P:1000 W:0'"/> <arg name="command" default="command: 'CSER'"/>
Then use this syntax $(arg data) to pass them inside args: args='call /config "{$(arg command), $(arg data)}"'