Adding collision objects with moveitCpp API
Hello,
I am testing the MoveitCpp API in ROS melodic, and as I understand from the tutorials in the Moveit website (MoveitCpp tutorial), this API allows to get rid of the internal topic subscriptions and rosservices of move_group, but it is not clear to me how it can be used along the other moveit components explained in the other tutorials. My question is: If you use this API, from where does it get the planning scene information? How can the collision objects and attached objects be added to the plannings? Is there an example available?
Thanks
Edit: I managed to publish the planning scene information to moveit_cpp by creating a moveit_msgs::PlanningScene and sending it with:
moveit_cpp_ptr->getPlanningSceneMonitor()->newPlanningSceneMessage(planning_scene_message);
but I had to manually initiallize the message with an initial joint state and the allowed_collision_matrix in order to get a plan (after sending the message, the adjacent links caused a collision if the allowed_collision_matrix was empty). My new question, related to this is: How can I get the allowed_collision_matrix using moveit_cpp? Can it be read from the robot.srdf ?