switching between joint_state_publisher and custom made joint_val_publisher

asked 2019-10-23 21:20:55 -0600

anirban gravatar image

Hi,

I have a simulated robot in RViz which is a 7 DoF robot arm. It receives fake joint angle values from the node joint_state_publisher. But now I have written ROS service server and client nodes to compute motion plan as service response given initial and final joint poses as input to the service request. Next I have another node named execute_plan that publishes joint angles, obtained from motion plan, to /joint_states topic. The problem is that since joint_state_publisher have already been publishing the joint angles to the /joint_states topic, launching the node execute_plan results in publishing different joint angles to the same /joint_states topic. As a result, in RViz I see a wired motion of the robot arm. I understand this is happening because of two nodes publishing different values to the same topic simultaneously. What I want is to kill (or send it to idle) the joint_state_publisher node as long as execute_plan is done with executing the plan. Can anyone tell me how to send a running node to idle mode while keeping track of the status of the other node? Any help is appreciated.

edit retag flag offensive close merge delete