Why environment server does not keep the collision object?
according to my understanding, once we use the set_planning_scene_diff service to add a collision object to the environment_server, it will stay there until another call explicitly deletes it. so if we use a first call to add a cylinder, then we make another set_planning_scene_diff call, but this time, the call is filled with an empty planing scene diff, the cylinder will still be there. but with my test, it seems that is not the case. the following is my test.
i have two nodes. one node(let us call it nodeA) launches a launch file. The launch file is just like the one (myRobot_arm_navigation.launch) generated by the planning_description_configuration_wizard. i.e., it starts the environment_server, ompl, trajectory_filter, kinematics, etc. The other node(let us call it nodeB) is written by myself. it first adds a cylinder as an collision object to the environment_server(through the call of set_planning_scene_diff), and then makes a planning from the start state to the goal where the cylinder is. it works well. then i close nodeB, make some modification to the code(comment the part of adding the cylinder), and re-run it. so this time the set_planning_scene_diff is filled with an empty planing scene. but it seems that the cylinder dispears. is there anybody know why?
thanks.