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

Revision history [back]

click to hide/show revision 1
initial version

Thanks for the help guys.

I've noticed that execution does happen serially, but I still don't think these solutions will solve the problem I am seeing. Allow me to add some additional detail:

Step 1: A user logs on to the system (in this case the pr2) and launches the basic robot communication nodes (in this case the l/r_arm_controller nodes). I definitely don't want to modify these scripts.

Step 2: A user decides to run my code by launching my launch file. I need to change some of the settings for the l/r_arm_controller_nodes, and the only way I've found to do this is to use pr2_controller_manager to kill the node, reload the param_server params with new values, and then use pr2_controller_manager respawn these nodes. I am pretty sure the l/r_arm_controller only reads the param_server when it is launched, so I need to actually kill it, change params, and respawn in this fashion.

The problem: Adding the commands to kill and spawn the controller in the same launch file does not result in the controller getting spawned properly. It looks like kill/spawn are executed in sequence so quickly that the pr2_controller_manager somehow doesn't deal with it properly. If I could add in a pause between kill and spawn in my launch file I believe this wouldn't be an issue.