moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
planning_scene::PlanningScene Class Reference

This class maintains the representation of the environment as seen by a planning instance. The environment geometry, the robot geometry and state are maintained. More...

#include <planning_scene.h>

Inheritance diagram for planning_scene::PlanningScene:
Inheritance graph
[legend]
Collaboration diagram for planning_scene::PlanningScene:
Collaboration graph
[legend]

Public Member Functions

 PlanningScene (const PlanningScene &)=delete
 PlanningScene cannot be copy-constructed.
 
PlanningSceneoperator= (const PlanningScene &)=delete
 PlanningScene cannot be copy-assigned.
 
 PlanningScene (const moveit::core::RobotModelConstPtr &robot_model, const collision_detection::WorldPtr &world=std::make_shared< collision_detection::World >())
 construct using an existing RobotModel
 
 PlanningScene (const urdf::ModelInterfaceSharedPtr &urdf_model, const srdf::ModelConstSharedPtr &srdf_model, const collision_detection::WorldPtr &world=std::make_shared< collision_detection::World >())
 construct using a urdf and srdf. A RobotModel for the PlanningScene will be created using the urdf and srdf.
 
 ~PlanningScene ()
 
const std::string & getName () const
 Get the name of the planning scene. This is empty by default.
 
void setName (const std::string &name)
 Set the name of the planning scene.
 
PlanningScenePtr diff () const
 Return a new child PlanningScene that uses this one as parent.
 
PlanningScenePtr diff (const moveit_msgs::msg::PlanningScene &msg) const
 Return a new child PlanningScene that uses this one as parent and has the diffs specified by msg applied.
 
const PlanningSceneConstPtr & getParent () const
 Get the parent scene (with respect to which the diffs are maintained). This may be empty.
 
const moveit::core::RobotModelConstPtr & getRobotModel () const
 Get the kinematic model for which the planning scene is maintained.
 
const moveit::core::RobotStategetCurrentState () const
 Get the state at which the robot is assumed to be.
 
moveit::core::RobotStategetCurrentStateNonConst ()
 Get the state at which the robot is assumed to be.
 
moveit::core::RobotStatePtr getCurrentStateUpdated (const moveit_msgs::msg::RobotState &update) const
 Get a copy of the current state with components overwritten by the state message update.
 
void saveGeometryToStream (std::ostream &out) const
 Save the geometry of the planning scene to a stream, as plain text.
 
bool loadGeometryFromStream (std::istream &in)
 Load the geometry of the planning scene from a stream.
 
bool loadGeometryFromStream (std::istream &in, const Eigen::Isometry3d &offset)
 Load the geometry of the planning scene from a stream at a certain location using offset.
 
void getPlanningSceneDiffMsg (moveit_msgs::msg::PlanningScene &scene) const
 Fill the message scene with the differences between this instance of PlanningScene with respect to the parent. If there is no parent, everything is considered to be a diff and the function behaves like getPlanningSceneMsg()
 
void getPlanningSceneMsg (moveit_msgs::msg::PlanningScene &scene) const
 Construct a message (scene) with all the necessary data so that the scene can be later reconstructed to be exactly the same using setPlanningSceneMsg()
 
void getPlanningSceneMsg (moveit_msgs::msg::PlanningScene &scene, const moveit_msgs::msg::PlanningSceneComponents &comp) const
 Construct a message (scene) with the data requested in comp. If all options in comp are filled, this will be a complete planning scene message.
 
bool getCollisionObjectMsg (moveit_msgs::msg::CollisionObject &collision_obj, const std::string &ns) const
 Construct a message (collision_object) with the collision object data from the planning_scene for the requested object.
 
void getCollisionObjectMsgs (std::vector< moveit_msgs::msg::CollisionObject > &collision_objs) const
 Construct a vector of messages (collision_objects) with the collision object data for all objects in planning_scene.
 
bool getAttachedCollisionObjectMsg (moveit_msgs::msg::AttachedCollisionObject &attached_collision_obj, const std::string &ns) const
 Construct a message (attached_collision_object) with the attached collision object data from the planning_scene for the requested object.
 
void getAttachedCollisionObjectMsgs (std::vector< moveit_msgs::msg::AttachedCollisionObject > &attached_collision_objs) const
 Construct a vector of messages (attached_collision_objects) with the attached collision object data for all objects in planning_scene.
 
bool getOctomapMsg (octomap_msgs::msg::OctomapWithPose &octomap) const
 Construct a message (octomap) with the octomap data from the planning_scene.
 
void getObjectColorMsgs (std::vector< moveit_msgs::msg::ObjectColor > &object_colors) const
 Construct a vector of messages (object_colors) with the colors of the objects from the planning_scene.
 
bool setPlanningSceneDiffMsg (const moveit_msgs::msg::PlanningScene &scene)
 Apply changes to this planning scene as diffs, even if the message itself is not marked as being a diff (is_diff member). A parent is not required to exist. However, the existing data in the planning instance is not cleared. Data from the message is only appended (and in cases such as e.g., the robot state, is overwritten).
 
bool setPlanningSceneMsg (const moveit_msgs::msg::PlanningScene &scene)
 Set this instance of a planning scene to be the same as the one serialized in the scene message, even if the message itself is marked as being a diff (is_diff member)
 
bool usePlanningSceneMsg (const moveit_msgs::msg::PlanningScene &scene)
 Call setPlanningSceneMsg() or setPlanningSceneDiffMsg() depending on how the is_diff member of the message is set.
 
bool shapesAndPosesFromCollisionObjectMessage (const moveit_msgs::msg::CollisionObject &object, Eigen::Isometry3d &object_pose_in_header_frame, std::vector< shapes::ShapeConstPtr > &shapes, EigenSTL::vector_Isometry3d &shape_poses)
 Takes the object message and returns the object pose, shapes and shape poses. If the object pose is empty (identity) but the shape pose is set, this uses the shape pose as the object pose. The shape pose becomes the identity instead.
 
bool processCollisionObjectMsg (const moveit_msgs::msg::CollisionObject &object)
 
bool processAttachedCollisionObjectMsg (const moveit_msgs::msg::AttachedCollisionObject &object)
 
bool processPlanningSceneWorldMsg (const moveit_msgs::msg::PlanningSceneWorld &world)
 
void processOctomapMsg (const octomap_msgs::msg::OctomapWithPose &map)
 
void processOctomapMsg (const octomap_msgs::msg::Octomap &map)
 
void processOctomapPtr (const std::shared_ptr< const octomap::OcTree > &octree, const Eigen::Isometry3d &t)
 
void removeAllCollisionObjects ()
 Clear all collision objects in planning scene.
 
void setCurrentState (const moveit_msgs::msg::RobotState &state)
 Set the current robot state to be state. If not all joint values are specified, the previously maintained joint values are kept.
 
void setCurrentState (const moveit::core::RobotState &state)
 Set the current robot state.
 
void setAttachedBodyUpdateCallback (const moveit::core::AttachedBodyCallback &callback)
 Set the callback to be triggered when changes are made to the current scene state.
 
void setCollisionObjectUpdateCallback (const collision_detection::World::ObserverCallbackFn &callback)
 Set the callback to be triggered when changes are made to the current scene world.
 
bool hasObjectColor (const std::string &id) const
 
const std_msgs::msg::ColorRGBA & getObjectColor (const std::string &id) const
 Gets the current color of an object.
 
std::optional< std_msgs::msg::ColorRGBA > getOriginalObjectColor (const std::string &id) const
 Tries to get the original color of an object, if one has been set before.
 
void setObjectColor (const std::string &id, const std_msgs::msg::ColorRGBA &color)
 
void removeObjectColor (const std::string &id)
 
void getKnownObjectColors (ObjectColorMap &kc) const
 
bool hasObjectType (const std::string &id) const
 
const object_recognition_msgs::msg::ObjectType & getObjectType (const std::string &id) const
 
void setObjectType (const std::string &id, const object_recognition_msgs::msg::ObjectType &type)
 
void removeObjectType (const std::string &id)
 
void getKnownObjectTypes (ObjectTypeMap &kc) const
 
void clearDiffs ()
 Clear the diffs accumulated for this planning scene, with respect to: the parent PlanningScene (if it exists) the parent CollisionDetector (if it exists) This function is a no-op if there is no parent planning scene.
 
void pushDiffs (const PlanningScenePtr &scene)
 If there is a parent specified for this scene, then the diffs with respect to that parent are applied to a specified planning scene, whatever that scene may be. If there is no parent specified, this function is a no-op.
 
void decoupleParent ()
 Make sure that all the data maintained in this scene is local. All unmodified data is copied from the parent and the pointer to the parent is discarded.
 
void setStateFeasibilityPredicate (const StateFeasibilityFn &fn)
 Specify a predicate that decides whether states are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation. This is useful for setting up problem specific constraints (e.g., stability)
 
const StateFeasibilityFngetStateFeasibilityPredicate () const
 Get the predicate that decides whether states are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation.
 
void setMotionFeasibilityPredicate (const MotionFeasibilityFn &fn)
 Specify a predicate that decides whether motion segments are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation.

 
const MotionFeasibilityFngetMotionFeasibilityPredicate () const
 Get the predicate that decides whether motion segments are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation.
 
bool isStateFeasible (const moveit_msgs::msg::RobotState &state, bool verbose=false) const
 Check if a given state is feasible, in accordance to the feasibility predicate specified by setStateFeasibilityPredicate(). Returns true if no feasibility predicate was specified.
 
bool isStateFeasible (const moveit::core::RobotState &state, bool verbose=false) const
 Check if a given state is feasible, in accordance to the feasibility predicate specified by setStateFeasibilityPredicate(). Returns true if no feasibility predicate was specified.
 
bool isStateConstrained (const moveit_msgs::msg::RobotState &state, const moveit_msgs::msg::Constraints &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints.
 
bool isStateConstrained (const moveit::core::RobotState &state, const moveit_msgs::msg::Constraints &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints.
 
bool isStateConstrained (const moveit_msgs::msg::RobotState &state, const kinematic_constraints::KinematicConstraintSet &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints.
 
bool isStateConstrained (const moveit::core::RobotState &state, const kinematic_constraints::KinematicConstraintSet &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints.
 
bool isStateValid (const moveit_msgs::msg::RobotState &state, const std::string &group="", bool verbose=false) const
 Check if a given state is valid. This means checking for collisions and feasibility. Includes descendent links of group.
 
bool isStateValid (const moveit::core::RobotState &state, const std::string &group="", bool verbose=false) const
 Check if a given state is valid. This means checking for collisions and feasibility. Includes descendent links of group.
 
bool isStateValid (const moveit_msgs::msg::RobotState &state, const moveit_msgs::msg::Constraints &constr, const std::string &group="", bool verbose=false) const
 Check if a given state is valid. This means checking for collisions, feasibility and whether the user specified validity conditions hold as well. Includes descendent links of group.
 
bool isStateValid (const moveit::core::RobotState &state, const moveit_msgs::msg::Constraints &constr, const std::string &group="", bool verbose=false) const
 Check if a given state is valid. This means checking for collisions, feasibility and whether the user specified validity conditions hold as well. Includes descendent links of group.
 
bool isStateValid (const moveit::core::RobotState &state, const kinematic_constraints::KinematicConstraintSet &constr, const std::string &group="", bool verbose=false) const
 Check if a given state is valid. This means checking for collisions, feasibility and whether the user specified validity conditions hold as well. Includes descendent links of group.
 
bool isPathValid (const moveit_msgs::msg::RobotState &start_state, const moveit_msgs::msg::RobotTrajectory &trajectory, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance and feasibility). Includes descendent links of group.
 
bool isPathValid (const moveit_msgs::msg::RobotState &start_state, const moveit_msgs::msg::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.
 
bool isPathValid (const moveit_msgs::msg::RobotState &start_state, const moveit_msgs::msg::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, const moveit_msgs::msg::Constraints &goal_constraints, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.
 
bool isPathValid (const moveit_msgs::msg::RobotState &start_state, const moveit_msgs::msg::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, const std::vector< moveit_msgs::msg::Constraints > &goal_constraints, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, const std::vector< moveit_msgs::msg::Constraints > &goal_constraints, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, const moveit_msgs::msg::Constraints &goal_constraints, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). Includes descendent links of group.
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const std::string &group="", bool verbose=false, std::vector< std::size_t > *invalid_index=nullptr) const
 Check if a given path is valid. Each state is checked for validity (collision avoidance and feasibility). Includes descendent links of group.
 
void getCostSources (const robot_trajectory::RobotTrajectory &trajectory, std::size_t max_costs, std::set< collision_detection::CostSource > &costs, double overlap_fraction=0.9) const
 Get the top max_costs cost sources for a specified trajectory. The resulting costs are stored in costs.
 
void getCostSources (const robot_trajectory::RobotTrajectory &trajectory, std::size_t max_costs, const std::string &group_name, std::set< collision_detection::CostSource > &costs, double overlap_fraction=0.9) const
 Get the top max_costs cost sources for a specified trajectory, but only for group group_name (plus descendent links). The resulting costs are stored in costs.
 
void getCostSources (const moveit::core::RobotState &state, std::size_t max_costs, std::set< collision_detection::CostSource > &costs) const
 Get the top max_costs cost sources for a specified state. The resulting costs are stored in costs.
 
void getCostSources (const moveit::core::RobotState &state, std::size_t max_costs, const std::string &group_name, std::set< collision_detection::CostSource > &costs) const
 Get the top max_costs cost sources for a specified state, but only for group group_name (plus descendent links). The resulting costs are stored in costs.
 
void printKnownObjects (std::ostream &out=std::cout) const
 Outputs debug information about the planning scene contents.
 
void allocateCollisionDetector (const collision_detection::CollisionDetectorAllocatorPtr &allocator)
 Allocate a new collision detector and replace the previous one if there was any.
 
Reasoning about frames
const std::string & getPlanningFrame () const
 Get the frame in which planning is performed.
 
const moveit::core::TransformsgetTransforms () const
 Get the set of fixed transforms from known frames to the planning frame.
 
const moveit::core::TransformsgetTransforms ()
 Get the set of fixed transforms from known frames to the planning frame. This variant is non-const and also updates the current state.
 
moveit::core::TransformsgetTransformsNonConst ()
 Get the set of fixed transforms from known frames to the planning frame.
 
const Eigen::Isometry3d & getFrameTransform (const std::string &id) const
 Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not.
 
const Eigen::Isometry3d & getFrameTransform (const std::string &id)
 Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not. Because this function is non-const, the current state transforms are also updated, if needed.
 
const Eigen::Isometry3d & getFrameTransform (moveit::core::RobotState &state, const std::string &id) const
 Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not. This function also updates the link transforms of state.
 
const Eigen::Isometry3d & getFrameTransform (const moveit::core::RobotState &state, const std::string &id) const
 Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not.
 
bool knowsFrameTransform (const std::string &id) const
 Check if a transform to the frame id is known. This will be known if id is a link name, an attached body id or a collision object.
 
bool knowsFrameTransform (const moveit::core::RobotState &state, const std::string &id) const
 Check if a transform to the frame id is known. This will be known if id is a link name, an attached body id or a collision object.
 
Reasoning about the geometry of the planning scene
const std::string getCollisionDetectorName () const
 
const collision_detection::WorldConstPtr & getWorld () const
 Get the representation of the world.
 
const collision_detection::WorldPtr & getWorldNonConst ()
 Get the representation of the world.
 
const collision_detection::CollisionEnvConstPtr & getCollisionEnv () const
 Get the active collision environment.
 
const collision_detection::CollisionEnvConstPtr & getCollisionEnvUnpadded () const
 Get the active collision detector for the robot.
 
const collision_detection::CollisionEnvConstPtr & getCollisionEnv (const std::string &collision_detector_name) const
 Get a specific collision detector for the world. If not found return active CollisionWorld.
 
const collision_detection::CollisionEnvConstPtr & getCollisionEnvUnpadded (const std::string &collision_detector_name) const
 Get a specific collision detector for the unpadded robot. If no found return active unpadded CollisionRobot.
 
const collision_detection::CollisionEnvPtr & getCollisionEnvNonConst ()
 Get the representation of the collision robot This can be used to set padding and link scale on the active collision_robot.
 
const collision_detection::AllowedCollisionMatrixgetAllowedCollisionMatrix () const
 Get the allowed collision matrix.
 
collision_detection::AllowedCollisionMatrixgetAllowedCollisionMatrixNonConst ()
 Get the allowed collision matrix.
 
void setAllowedCollisionMatrix (const collision_detection::AllowedCollisionMatrix &acm)
 Set the allowed collision matrix.
 
Collision checking with respect to this planning scene
bool isStateColliding (const std::string &group="", bool verbose=false)
 Check if the current state is in collision (with the environment or self collision). If a group name is specified, collision checking is done for that group only (plus descendent links). Since the function is non-const, the current state transforms are updated before the collision check.
 
bool isStateColliding (const std::string &group="", bool verbose=false) const
 Check if the current state is in collision (with the environment or self collision). If a group name is specified, collision checking is done for that group only (plus descendent links). It is expected the current state transforms are up to date.
 
bool isStateColliding (moveit::core::RobotState &state, const std::string &group="", bool verbose=false) const
 Check if a given state is in collision (with the environment or self collision) If a group name is specified, collision checking is done for that group only (plus descendent links). The link transforms for state are updated before the collision check.
 
bool isStateColliding (const moveit::core::RobotState &state, const std::string &group="", bool verbose=false) const
 Check if a given state is in collision (with the environment or self collision) If a group name is specified, collision checking is done for that group only (plus descendent links). It is expected that the link transforms of state are up to date.
 
bool isStateColliding (const moveit_msgs::msg::RobotState &state, const std::string &group="", bool verbose=false) const
 Check if a given state is in collision (with the environment or self collision) If a group name is specified, collision checking is done for that group only (plus descendent links).
 
void checkCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res)
 Check whether the current state is in collision, and if needed, updates the collision transforms of the current state before the computation.
 
void checkCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res) const
 Check whether the current state is in collision. The current state is expected to be updated.
 
void checkCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, moveit::core::RobotState &robot_state) const
 Check whether a specified state (robot_state) is in collision. This variant of the function takes a non-const robot_state and calls updateCollisionBodyTransforms() on it.
 
void checkCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const moveit::core::RobotState &robot_state) const
 Check whether a specified state (robot_state) is in collision. The collision transforms of robot_state are expected to be up to date.
 
void checkCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm). This variant of the function takes a non-const robot_state and updates its link transforms if needed.
 
void checkCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm).
 
void checkCollisionUnpadded (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res)
 Check whether the current state is in collision, but use a collision_detection::CollisionRobot instance that has no padding. Since the function is non-const, the current state transforms are also updated if needed.
 
void checkCollisionUnpadded (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res) const
 Check whether the current state is in collision, but use a collision_detection::CollisionRobot instance that has no padding.

 
void checkCollisionUnpadded (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const moveit::core::RobotState &robot_state) const
 Check whether a specified state (robot_state) is in collision, but use a collision_detection::CollisionRobot instance that has no padding.

 
void checkCollisionUnpadded (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, moveit::core::RobotState &robot_state) const
 Check whether a specified state (robot_state) is in collision, but use a collision_detection::CollisionRobot instance that has no padding. Update the link transforms of robot_state if needed.
 
void checkCollisionUnpadded (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm), but use a collision_detection::CollisionRobot instance that has no padding. This variant of the function takes a non-const robot_state and calls updates the link transforms if needed.
 
void checkCollisionUnpadded (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm), but use a collision_detection::CollisionRobot instance that has no padding.

 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res)
 Check whether the current state is in self collision.
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res) const
 Check whether the current state is in self collision.
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, moveit::core::RobotState &robot_state) const
 Check whether a specified state (robot_state) is in self collision.
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const moveit::core::RobotState &robot_state) const
 Check whether a specified state (robot_state) is in self collision.
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Check whether a specified state (robot_state) is in self collision, with respect to a given allowed collision matrix (acm). The link transforms of robot_state are updated if needed.
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Check whether a specified state (robot_state) is in self collision, with respect to a given allowed collision matrix (acm)
 
void getCollidingLinks (std::vector< std::string > &links)
 Get the names of the links that are involved in collisions for the current state.
 
void getCollidingLinks (std::vector< std::string > &links) const
 Get the names of the links that are involved in collisions for the current state.
 
void getCollidingLinks (std::vector< std::string > &links, moveit::core::RobotState &robot_state) const
 Get the names of the links that are involved in collisions for the state robot_state. Update the link transforms for robot_state if needed.
 
void getCollidingLinks (std::vector< std::string > &links, const moveit::core::RobotState &robot_state) const
 Get the names of the links that are involved in collisions for the state robot_state.
 
void getCollidingLinks (std::vector< std::string > &links, moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm)
 
void getCollidingLinks (std::vector< std::string > &links, const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm)
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts)
 Get the names of the links that are involved in collisions for the current state. Update the link transforms for the current state if needed.
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts) const
 Get the names of the links that are involved in collisions for the current state.
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts, const moveit::core::RobotState &robot_state, const std::string &group_name="") const
 Get the names of the links that are involved in collisions for the state robot_state. Can be restricted to links part of or updated by group_name (plus descendent links)
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts, moveit::core::RobotState &robot_state, const std::string &group_name="") const
 Get the names of the links that are involved in collisions for the state robot_state. Update the link transforms for robot_state if needed. Can be restricted to links part of or updated by group_name (plus descendent links)
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts, moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm, const std::string &group_name="") const
 Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm). Update the link transforms for robot_state if needed. Can be restricted to links part of or updated by group_name (plus descendent links)
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts, const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm, const std::string &group_name="") const
 Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm). Can be restricted to links part of or updated by group_name (plus descendent links)
 
Distance computation
double distanceToCollision (moveit::core::RobotState &robot_state) const
 The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions)
 
double distanceToCollision (const moveit::core::RobotState &robot_state) const
 The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions)
 
double distanceToCollisionUnpadded (moveit::core::RobotState &robot_state) const
 The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions), if the robot has no padding.
 
double distanceToCollisionUnpadded (const moveit::core::RobotState &robot_state) const
 The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions), if the robot has no padding.
 
double distanceToCollision (moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that are allowed to collide.
 
double distanceToCollision (const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that are allowed to collide.
 
double distanceToCollisionUnpadded (moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that are allowed to collide, if the robot has no padding.
 
double distanceToCollisionUnpadded (const moveit::core::RobotState &robot_state, const collision_detection::AllowedCollisionMatrix &acm) const
 The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that always allowed to collide, if the robot has no padding.
 

Static Public Member Functions

static PlanningScenePtr clone (const PlanningSceneConstPtr &scene)
 Clone a planning scene. Even if the scene scene depends on a parent, the cloned scene will not.
 

Static Public Attributes

static const std::string OCTOMAP_NS = "<octomap>"
 
static const std::string DEFAULT_SCENE_NAME = "(noname)"
 

Friends

struct CollisionDetector
 Enumerates the available collision detectors.
 

Detailed Description

This class maintains the representation of the environment as seen by a planning instance. The environment geometry, the robot geometry and state are maintained.

Definition at line 91 of file planning_scene.h.

Constructor & Destructor Documentation

◆ PlanningScene() [1/3]

planning_scene::PlanningScene::PlanningScene ( const PlanningScene )
delete

PlanningScene cannot be copy-constructed.

◆ PlanningScene() [2/3]

planning_scene::PlanningScene::PlanningScene ( const moveit::core::RobotModelConstPtr &  robot_model,
const collision_detection::WorldPtr &  world = std::make_shared<collision_detection::World>() 
)

construct using an existing RobotModel

Definition at line 154 of file planning_scene.cpp.

◆ PlanningScene() [3/3]

planning_scene::PlanningScene::PlanningScene ( const urdf::ModelInterfaceSharedPtr &  urdf_model,
const srdf::ModelConstSharedPtr &  srdf_model,
const collision_detection::WorldPtr &  world = std::make_shared<collision_detection::World>() 
)

construct using a urdf and srdf. A RobotModel for the PlanningScene will be created using the urdf and srdf.

Definition at line 162 of file planning_scene.cpp.

◆ ~PlanningScene()

planning_scene::PlanningScene::~PlanningScene ( )

Definition at line 182 of file planning_scene.cpp.

Member Function Documentation

◆ allocateCollisionDetector()

void planning_scene::PlanningScene::allocateCollisionDetector ( const collision_detection::CollisionDetectorAllocatorPtr &  allocator)
inline

Allocate a new collision detector and replace the previous one if there was any.

The collision detector type is specified with (a shared pointer to) an allocator which is a subclass of CollisionDetectorAllocator. This identifies a combination of CollisionWorld/CollisionRobot which can be used together.

A new PlanningScene uses an FCL collision detector by default.

example: to add FCL collision detection (normally not necessary) call planning_scene->allocateCollisionDetector(collision_detection::CollisionDetectorAllocatorFCL::create());

Definition at line 922 of file planning_scene.h.

Here is the caller graph for this function:

◆ checkCollision() [1/6]

void planning_scene::PlanningScene::checkCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res 
)

Check whether the current state is in collision, and if needed, updates the collision transforms of the current state before the computation.

Definition at line 394 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkCollision() [2/6]

void planning_scene::PlanningScene::checkCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res 
) const

Check whether the current state is in collision. The current state is expected to be updated.

Definition at line 400 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollision() [3/6]

void planning_scene::PlanningScene::checkCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
const moveit::core::RobotState robot_state 
) const

Check whether a specified state (robot_state) is in collision. The collision transforms of robot_state are expected to be up to date.

Definition at line 413 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollision() [4/6]

void planning_scene::PlanningScene::checkCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm).

Definition at line 431 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollision() [5/6]

void planning_scene::PlanningScene::checkCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
moveit::core::RobotState robot_state 
) const

Check whether a specified state (robot_state) is in collision. This variant of the function takes a non-const robot_state and calls updateCollisionBodyTransforms() on it.

Definition at line 406 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollision() [6/6]

void planning_scene::PlanningScene::checkCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm). This variant of the function takes a non-const robot_state and updates its link transforms if needed.

Definition at line 420 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollisionUnpadded() [1/6]

void planning_scene::PlanningScene::checkCollisionUnpadded ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res 
)

Check whether the current state is in collision, but use a collision_detection::CollisionRobot instance that has no padding. Since the function is non-const, the current state transforms are also updated if needed.

Definition at line 452 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkCollisionUnpadded() [2/6]

void planning_scene::PlanningScene::checkCollisionUnpadded ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res 
) const

Check whether the current state is in collision, but use a collision_detection::CollisionRobot instance that has no padding.

Definition at line 460 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollisionUnpadded() [3/6]

void planning_scene::PlanningScene::checkCollisionUnpadded ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
const moveit::core::RobotState robot_state 
) const

Check whether a specified state (robot_state) is in collision, but use a collision_detection::CollisionRobot instance that has no padding.

Definition at line 468 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollisionUnpadded() [4/6]

void planning_scene::PlanningScene::checkCollisionUnpadded ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm), but use a collision_detection::CollisionRobot instance that has no padding.

Definition at line 497 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollisionUnpadded() [5/6]

void planning_scene::PlanningScene::checkCollisionUnpadded ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
moveit::core::RobotState robot_state 
) const

Check whether a specified state (robot_state) is in collision, but use a collision_detection::CollisionRobot instance that has no padding. Update the link transforms of robot_state if needed.

Definition at line 477 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkCollisionUnpadded() [6/6]

void planning_scene::PlanningScene::checkCollisionUnpadded ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Check whether a specified state (robot_state) is in collision, with respect to a given allowed collision matrix (acm), but use a collision_detection::CollisionRobot instance that has no padding. This variant of the function takes a non-const robot_state and calls updates the link transforms if needed.

Definition at line 486 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkSelfCollision() [1/6]

void planning_scene::PlanningScene::checkSelfCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res 
)

Check whether the current state is in self collision.

Definition at line 507 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkSelfCollision() [2/6]

void planning_scene::PlanningScene::checkSelfCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res 
) const

Check whether the current state is in self collision.

Definition at line 513 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkSelfCollision() [3/6]

void planning_scene::PlanningScene::checkSelfCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
const moveit::core::RobotState robot_state 
) const

Check whether a specified state (robot_state) is in self collision.

Definition at line 530 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkSelfCollision() [4/6]

void planning_scene::PlanningScene::checkSelfCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Check whether a specified state (robot_state) is in self collision, with respect to a given allowed collision matrix (acm)

Definition at line 548 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkSelfCollision() [5/6]

void planning_scene::PlanningScene::checkSelfCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
moveit::core::RobotState robot_state 
) const

Check whether a specified state (robot_state) is in self collision.

Definition at line 519 of file planning_scene.cpp.

Here is the call graph for this function:

◆ checkSelfCollision() [6/6]

void planning_scene::PlanningScene::checkSelfCollision ( const collision_detection::CollisionRequest req,
collision_detection::CollisionResult res,
moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Check whether a specified state (robot_state) is in self collision, with respect to a given allowed collision matrix (acm). The link transforms of robot_state are updated if needed.

Definition at line 537 of file planning_scene.cpp.

Here is the call graph for this function:

◆ clearDiffs()

void planning_scene::PlanningScene::clearDiffs ( )

Clear the diffs accumulated for this planning scene, with respect to: the parent PlanningScene (if it exists) the parent CollisionDetector (if it exists) This function is a no-op if there is no parent planning scene.

Definition at line 316 of file planning_scene.cpp.

Here is the call graph for this function:

◆ clone()

PlanningScenePtr planning_scene::PlanningScene::clone ( const PlanningSceneConstPtr &  scene)
static

Clone a planning scene. Even if the scene scene depends on a parent, the cloned scene will not.

Definition at line 229 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ decoupleParent()

void planning_scene::PlanningScene::decoupleParent ( )

Make sure that all the data maintained in this scene is local. All unmodified data is copied from the parent and the pointer to the parent is discarded.

Definition at line 1250 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ diff() [1/2]

PlanningScenePtr planning_scene::PlanningScene::diff ( ) const

Return a new child PlanningScene that uses this one as parent.

The child scene has its own copy of the world. It maintains a list (in world_diff_) of changes made to the child world.

The robot_model_, robot_state_, scene_transforms_, and acm_ are not copied. They are shared with the parent. So if changes to these are made in the parent they will be visible in the child. But if any of these is modified (i.e. if the get*NonConst functions are called) in the child then a copy is made and subsequent changes to the corresponding member of the parent will no longer be visible in the child.

Definition at line 237 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ diff() [2/2]

PlanningScenePtr planning_scene::PlanningScene::diff ( const moveit_msgs::msg::PlanningScene &  msg) const

Return a new child PlanningScene that uses this one as parent and has the diffs specified by msg applied.

Definition at line 242 of file planning_scene.cpp.

Here is the call graph for this function:

◆ distanceToCollision() [1/4]

double planning_scene::PlanningScene::distanceToCollision ( const moveit::core::RobotState robot_state) const
inline

The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions)

Definition at line 546 of file planning_scene.h.

◆ distanceToCollision() [2/4]

double planning_scene::PlanningScene::distanceToCollision ( const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const
inline

The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that are allowed to collide.

Definition at line 579 of file planning_scene.h.

◆ distanceToCollision() [3/4]

double planning_scene::PlanningScene::distanceToCollision ( moveit::core::RobotState robot_state) const
inline

The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions)

Definition at line 537 of file planning_scene.h.

Here is the call graph for this function:

◆ distanceToCollision() [4/4]

double planning_scene::PlanningScene::distanceToCollision ( moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const
inline

The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that are allowed to collide.

Definition at line 569 of file planning_scene.h.

Here is the call graph for this function:

◆ distanceToCollisionUnpadded() [1/4]

double planning_scene::PlanningScene::distanceToCollisionUnpadded ( const moveit::core::RobotState robot_state) const
inline

The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions), if the robot has no padding.

Definition at line 561 of file planning_scene.h.

◆ distanceToCollisionUnpadded() [2/4]

double planning_scene::PlanningScene::distanceToCollisionUnpadded ( const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const
inline

The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that always allowed to collide, if the robot has no padding.

Definition at line 598 of file planning_scene.h.

◆ distanceToCollisionUnpadded() [3/4]

double planning_scene::PlanningScene::distanceToCollisionUnpadded ( moveit::core::RobotState robot_state) const
inline

The distance between the robot model at state robot_state to the nearest collision (ignoring self-collisions), if the robot has no padding.

Definition at line 553 of file planning_scene.h.

Here is the call graph for this function:

◆ distanceToCollisionUnpadded() [4/4]

double planning_scene::PlanningScene::distanceToCollisionUnpadded ( moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const
inline

The distance between the robot model at state robot_state to the nearest collision, ignoring self-collisions and elements that are allowed to collide, if the robot has no padding.

Definition at line 588 of file planning_scene.h.

Here is the call graph for this function:

◆ getAllowedCollisionMatrix()

const collision_detection::AllowedCollisionMatrix & planning_scene::PlanningScene::getAllowedCollisionMatrix ( ) const
inline

Get the allowed collision matrix.

Definition at line 292 of file planning_scene.h.

Here is the caller graph for this function:

◆ getAllowedCollisionMatrixNonConst()

collision_detection::AllowedCollisionMatrix & planning_scene::PlanningScene::getAllowedCollisionMatrixNonConst ( )

Get the allowed collision matrix.

Definition at line 654 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ getAttachedCollisionObjectMsg()

bool planning_scene::PlanningScene::getAttachedCollisionObjectMsg ( moveit_msgs::msg::AttachedCollisionObject &  attached_collision_obj,
const std::string &  ns 
) const

Construct a message (attached_collision_object) with the attached collision object data from the planning_scene for the requested object.

Definition at line 887 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getAttachedCollisionObjectMsgs()

void planning_scene::PlanningScene::getAttachedCollisionObjectMsgs ( std::vector< moveit_msgs::msg::AttachedCollisionObject > &  attached_collision_objs) const

Construct a vector of messages (attached_collision_objects) with the attached collision object data for all objects in planning_scene.

Definition at line 903 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCollidingLinks() [1/6]

void planning_scene::PlanningScene::getCollidingLinks ( std::vector< std::string > &  links)

Get the names of the links that are involved in collisions for the current state.

Definition at line 584 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCollidingLinks() [2/6]

void planning_scene::PlanningScene::getCollidingLinks ( std::vector< std::string > &  links) const
inline

Get the names of the links that are involved in collisions for the current state.

Definition at line 447 of file planning_scene.h.

◆ getCollidingLinks() [3/6]

void planning_scene::PlanningScene::getCollidingLinks ( std::vector< std::string > &  links,
const moveit::core::RobotState robot_state 
) const
inline

Get the names of the links that are involved in collisions for the state robot_state.

Definition at line 461 of file planning_scene.h.

◆ getCollidingLinks() [4/6]

void planning_scene::PlanningScene::getCollidingLinks ( std::vector< std::string > &  links,
const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const

Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm)

Definition at line 596 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCollidingLinks() [5/6]

void planning_scene::PlanningScene::getCollidingLinks ( std::vector< std::string > &  links,
moveit::core::RobotState robot_state 
) const
inline

Get the names of the links that are involved in collisions for the state robot_state. Update the link transforms for robot_state if needed.

Definition at line 454 of file planning_scene.h.

Here is the call graph for this function:

◆ getCollidingLinks() [6/6]

void planning_scene::PlanningScene::getCollidingLinks ( std::vector< std::string > &  links,
moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm 
) const
inline

Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm)

Definition at line 468 of file planning_scene.h.

Here is the call graph for this function:

◆ getCollidingPairs() [1/6]

void planning_scene::PlanningScene::getCollidingPairs ( collision_detection::CollisionResult::ContactMap contacts)

Get the names of the links that are involved in collisions for the current state. Update the link transforms for the current state if needed.

Definition at line 557 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCollidingPairs() [2/6]

void planning_scene::PlanningScene::getCollidingPairs ( collision_detection::CollisionResult::ContactMap contacts) const
inline

Get the names of the links that are involved in collisions for the current state.

Definition at line 485 of file planning_scene.h.

◆ getCollidingPairs() [3/6]

void planning_scene::PlanningScene::getCollidingPairs ( collision_detection::CollisionResult::ContactMap contacts,
const moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm,
const std::string &  group_name = "" 
) const

Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm). Can be restricted to links part of or updated by group_name (plus descendent links)

Definition at line 569 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCollidingPairs() [4/6]

void planning_scene::PlanningScene::getCollidingPairs ( collision_detection::CollisionResult::ContactMap contacts,
const moveit::core::RobotState robot_state,
const std::string &  group_name = "" 
) const
inline

Get the names of the links that are involved in collisions for the state robot_state. Can be restricted to links part of or updated by group_name (plus descendent links)

Definition at line 492 of file planning_scene.h.

◆ getCollidingPairs() [5/6]

void planning_scene::PlanningScene::getCollidingPairs ( collision_detection::CollisionResult::ContactMap contacts,
moveit::core::RobotState robot_state,
const collision_detection::AllowedCollisionMatrix acm,
const std::string &  group_name = "" 
) const
inline

Get the names of the links that are involved in collisions for the state robot_state given the allowed collision matrix (acm). Update the link transforms for robot_state if needed. Can be restricted to links part of or updated by group_name (plus descendent links)

Definition at line 512 of file planning_scene.h.

Here is the call graph for this function:

◆ getCollidingPairs() [6/6]

void planning_scene::PlanningScene::getCollidingPairs ( collision_detection::CollisionResult::ContactMap contacts,
moveit::core::RobotState robot_state,
const std::string &  group_name = "" 
) const
inline

Get the names of the links that are involved in collisions for the state robot_state. Update the link transforms for robot_state if needed. Can be restricted to links part of or updated by group_name (plus descendent links)

Definition at line 501 of file planning_scene.h.

Here is the call graph for this function:

◆ getCollisionDetectorName()

const std::string planning_scene::PlanningScene::getCollisionDetectorName ( ) const
inline

Definition at line 247 of file planning_scene.h.

Here is the caller graph for this function:

◆ getCollisionEnv() [1/2]

const collision_detection::CollisionEnvConstPtr & planning_scene::PlanningScene::getCollisionEnv ( ) const
inline

Get the active collision environment.

Definition at line 268 of file planning_scene.h.

Here is the caller graph for this function:

◆ getCollisionEnv() [2/2]

const collision_detection::CollisionEnvConstPtr & planning_scene::PlanningScene::getCollisionEnv ( const std::string &  collision_detector_name) const

Get a specific collision detector for the world. If not found return active CollisionWorld.

Definition at line 289 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCollisionEnvNonConst()

const collision_detection::CollisionEnvPtr & planning_scene::PlanningScene::getCollisionEnvNonConst ( )

Get the representation of the collision robot This can be used to set padding and link scale on the active collision_robot.

Definition at line 615 of file planning_scene.cpp.

◆ getCollisionEnvUnpadded() [1/2]

const collision_detection::CollisionEnvConstPtr & planning_scene::PlanningScene::getCollisionEnvUnpadded ( ) const
inline

Get the active collision detector for the robot.

Definition at line 274 of file planning_scene.h.

Here is the caller graph for this function:

◆ getCollisionEnvUnpadded() [2/2]

const collision_detection::CollisionEnvConstPtr & planning_scene::PlanningScene::getCollisionEnvUnpadded ( const std::string &  collision_detector_name) const

Get a specific collision detector for the unpadded robot. If no found return active unpadded CollisionRobot.

Definition at line 302 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCollisionObjectMsg()

bool planning_scene::PlanningScene::getCollisionObjectMsg ( moveit_msgs::msg::CollisionObject &  collision_obj,
const std::string &  ns 
) const

Construct a message (collision_object) with the collision object data from the planning_scene for the requested object.

Definition at line 835 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCollisionObjectMsgs()

void planning_scene::PlanningScene::getCollisionObjectMsgs ( std::vector< moveit_msgs::msg::CollisionObject > &  collision_objs) const

Construct a vector of messages (collision_objects) with the collision object data for all objects in planning_scene.

Definition at line 873 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCostSources() [1/4]

void planning_scene::PlanningScene::getCostSources ( const moveit::core::RobotState state,
std::size_t  max_costs,
const std::string &  group_name,
std::set< collision_detection::CostSource > &  costs 
) const

Get the top max_costs cost sources for a specified state, but only for group group_name (plus descendent links). The resulting costs are stored in costs.

Definition at line 2492 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCostSources() [2/4]

void planning_scene::PlanningScene::getCostSources ( const moveit::core::RobotState state,
std::size_t  max_costs,
std::set< collision_detection::CostSource > &  costs 
) const

Get the top max_costs cost sources for a specified state. The resulting costs are stored in costs.

Definition at line 2486 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCostSources() [3/4]

void planning_scene::PlanningScene::getCostSources ( const robot_trajectory::RobotTrajectory trajectory,
std::size_t  max_costs,
const std::string &  group_name,
std::set< collision_detection::CostSource > &  costs,
double  overlap_fraction = 0.9 
) const

Get the top max_costs cost sources for a specified trajectory, but only for group group_name (plus descendent links). The resulting costs are stored in costs.

Definition at line 2450 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getCostSources() [4/4]

void planning_scene::PlanningScene::getCostSources ( const robot_trajectory::RobotTrajectory trajectory,
std::size_t  max_costs,
std::set< collision_detection::CostSource > &  costs,
double  overlap_fraction = 0.9 
) const

Get the top max_costs cost sources for a specified trajectory. The resulting costs are stored in costs.

Definition at line 2444 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentState()

const moveit::core::RobotState & planning_scene::PlanningScene::getCurrentState ( ) const
inline

Get the state at which the robot is assumed to be.

Definition at line 160 of file planning_scene.h.

Here is the caller graph for this function:

◆ getCurrentStateNonConst()

moveit::core::RobotState & planning_scene::PlanningScene::getCurrentStateNonConst ( )

Get the state at which the robot is assumed to be.

Definition at line 620 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ getCurrentStateUpdated()

moveit::core::RobotStatePtr planning_scene::PlanningScene::getCurrentStateUpdated ( const moveit_msgs::msg::RobotState &  update) const

Get a copy of the current state with components overwritten by the state message update.

Definition at line 631 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getFrameTransform() [1/4]

const Eigen::Isometry3d & planning_scene::PlanningScene::getFrameTransform ( const moveit::core::RobotState state,
const std::string &  id 
) const

Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not.

Definition at line 2029 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getFrameTransform() [2/4]

const Eigen::Isometry3d & planning_scene::PlanningScene::getFrameTransform ( const std::string &  id)

Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not. Because this function is non-const, the current state transforms are also updated, if needed.

Definition at line 2017 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getFrameTransform() [3/4]

const Eigen::Isometry3d & planning_scene::PlanningScene::getFrameTransform ( const std::string &  id) const

Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not.

Definition at line 2012 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFrameTransform() [4/4]

const Eigen::Isometry3d & planning_scene::PlanningScene::getFrameTransform ( moveit::core::RobotState state,
const std::string &  id 
) const
inline

Get the transform corresponding to the frame id. This will be known if id is a link name, an attached body id or a collision object. Return identity when no transform is available. Use knowsFrameTransform() to test if this function will be successful or not. This function also updates the link transforms of state.

Definition at line 220 of file planning_scene.h.

Here is the call graph for this function:

◆ getKnownObjectColors()

void planning_scene::PlanningScene::getKnownObjectColors ( ObjectColorMap kc) const

Definition at line 2154 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ getKnownObjectTypes()

void planning_scene::PlanningScene::getKnownObjectTypes ( ObjectTypeMap kc) const

Definition at line 2105 of file planning_scene.cpp.

◆ getMotionFeasibilityPredicate()

const MotionFeasibilityFn & planning_scene::PlanningScene::getMotionFeasibilityPredicate ( ) const
inline

Get the predicate that decides whether motion segments are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation.

Definition at line 774 of file planning_scene.h.

◆ getName()

const std::string & planning_scene::PlanningScene::getName ( ) const
inline

Get the name of the planning scene. This is empty by default.

Definition at line 119 of file planning_scene.h.

Here is the caller graph for this function:

◆ getObjectColor()

const std_msgs::msg::ColorRGBA & planning_scene::PlanningScene::getObjectColor ( const std::string &  id) const

Gets the current color of an object.

Parameters
idThe string id of the target object.
Returns
The current object color.

Definition at line 2129 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ getObjectColorMsgs()

void planning_scene::PlanningScene::getObjectColorMsgs ( std::vector< moveit_msgs::msg::ObjectColor > &  object_colors) const

Construct a vector of messages (object_colors) with the colors of the objects from the planning_scene.

Definition at line 932 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getObjectType()

const object_recognition_msgs::msg::ObjectType & planning_scene::PlanningScene::getObjectType ( const std::string &  id) const

Definition at line 2078 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ getOctomapMsg()

bool planning_scene::PlanningScene::getOctomapMsg ( octomap_msgs::msg::OctomapWithPose &  octomap) const

Construct a message (octomap) with the octomap data from the planning_scene.

Definition at line 911 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOriginalObjectColor()

std::optional< std_msgs::msg::ColorRGBA > planning_scene::PlanningScene::getOriginalObjectColor ( const std::string &  id) const

Tries to get the original color of an object, if one has been set before.

Parameters
idThe string id of the target object.
Returns
The original object color, if available, otherwise std::nullopt.

Definition at line 2143 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ getParent()

const PlanningSceneConstPtr & planning_scene::PlanningScene::getParent ( ) const
inline

Get the parent scene (with respect to which the diffs are maintained). This may be empty.

Definition at line 147 of file planning_scene.h.

◆ getPlanningFrame()

const std::string & planning_scene::PlanningScene::getPlanningFrame ( ) const
inline

Get the frame in which planning is performed.

Definition at line 177 of file planning_scene.h.

Here is the caller graph for this function:

◆ getPlanningSceneDiffMsg()

void planning_scene::PlanningScene::getPlanningSceneDiffMsg ( moveit_msgs::msg::PlanningScene &  scene) const

Fill the message scene with the differences between this instance of PlanningScene with respect to the parent. If there is no parent, everything is considered to be a diff and the function behaves like getPlanningSceneMsg()

Definition at line 687 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getPlanningSceneMsg() [1/2]

void planning_scene::PlanningScene::getPlanningSceneMsg ( moveit_msgs::msg::PlanningScene &  scene) const

Construct a message (scene) with all the necessary data so that the scene can be later reconstructed to be exactly the same using setPlanningSceneMsg()

Definition at line 947 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlanningSceneMsg() [2/2]

void planning_scene::PlanningScene::getPlanningSceneMsg ( moveit_msgs::msg::PlanningScene &  scene,
const moveit_msgs::msg::PlanningSceneComponents &  comp 
) const

Construct a message (scene) with the data requested in comp. If all options in comp are filled, this will be a complete planning scene message.

Definition at line 968 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getRobotModel()

const moveit::core::RobotModelConstPtr & planning_scene::PlanningScene::getRobotModel ( ) const
inline

Get the kinematic model for which the planning scene is maintained.

Definition at line 153 of file planning_scene.h.

Here is the caller graph for this function:

◆ getStateFeasibilityPredicate()

const StateFeasibilityFn & planning_scene::PlanningScene::getStateFeasibilityPredicate ( ) const
inline

Get the predicate that decides whether states are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation.

Definition at line 760 of file planning_scene.h.

◆ getTransforms() [1/2]

const moveit::core::Transforms & planning_scene::PlanningScene::getTransforms ( )

Get the set of fixed transforms from known frames to the planning frame. This variant is non-const and also updates the current state.

Definition at line 666 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getTransforms() [2/2]

const moveit::core::Transforms & planning_scene::PlanningScene::getTransforms ( ) const
inline

Get the set of fixed transforms from known frames to the planning frame.

Definition at line 184 of file planning_scene.h.

Here is the caller graph for this function:

◆ getTransformsNonConst()

moveit::core::Transforms & planning_scene::PlanningScene::getTransformsNonConst ( )

Get the set of fixed transforms from known frames to the planning frame.

Definition at line 673 of file planning_scene.cpp.

Here is the call graph for this function:

◆ getWorld()

const collision_detection::WorldConstPtr & planning_scene::PlanningScene::getWorld ( ) const
inline

Get the representation of the world.

Definition at line 254 of file planning_scene.h.

Here is the caller graph for this function:

◆ getWorldNonConst()

const collision_detection::WorldPtr & planning_scene::PlanningScene::getWorldNonConst ( )
inline

Get the representation of the world.

Definition at line 261 of file planning_scene.h.

◆ hasObjectColor()

bool planning_scene::PlanningScene::hasObjectColor ( const std::string &  id) const

Definition at line 2117 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ hasObjectType()

bool planning_scene::PlanningScene::hasObjectType ( const std::string &  id) const

Definition at line 2066 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ isPathValid() [1/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::msg::RobotState &  start_state,
const moveit_msgs::msg::RobotTrajectory &  trajectory,
const moveit_msgs::msg::Constraints &  path_constraints,
const moveit_msgs::msg::Constraints &  goal_constraints,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.

Definition at line 2335 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isPathValid() [2/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::msg::RobotState &  start_state,
const moveit_msgs::msg::RobotTrajectory &  trajectory,
const moveit_msgs::msg::Constraints &  path_constraints,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.

Definition at line 2326 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isPathValid() [3/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::msg::RobotState &  start_state,
const moveit_msgs::msg::RobotTrajectory &  trajectory,
const moveit_msgs::msg::Constraints &  path_constraints,
const std::vector< moveit_msgs::msg::Constraints > &  goal_constraints,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.

Definition at line 2345 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isPathValid() [4/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::msg::RobotState &  start_state,
const moveit_msgs::msg::RobotTrajectory &  trajectory,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance and feasibility). Includes descendent links of group.

Definition at line 2317 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPathValid() [5/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const moveit_msgs::msg::Constraints &  path_constraints,
const moveit_msgs::msg::Constraints &  goal_constraints,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.

Definition at line 2419 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isPathValid() [6/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const moveit_msgs::msg::Constraints &  path_constraints,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). Includes descendent links of group.

Definition at line 2428 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isPathValid() [7/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const moveit_msgs::msg::Constraints &  path_constraints,
const std::vector< moveit_msgs::msg::Constraints > &  goal_constraints,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance, feasibility and constraint satisfaction). It is also checked that the goal constraints are satisfied by the last state on the passed in trajectory. Includes descendent links of group.

Definition at line 2358 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isPathValid() [8/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const std::string &  group = "",
bool  verbose = false,
std::vector< std::size_t > *  invalid_index = nullptr 
) const

Check if a given path is valid. Each state is checked for validity (collision avoidance and feasibility). Includes descendent links of group.

Definition at line 2436 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateColliding() [1/5]

bool planning_scene::PlanningScene::isStateColliding ( const moveit::core::RobotState state,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is in collision (with the environment or self collision) If a group name is specified, collision checking is done for that group only (plus descendent links). It is expected that the link transforms of state are up to date.

Definition at line 2210 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateColliding() [2/5]

bool planning_scene::PlanningScene::isStateColliding ( const moveit_msgs::msg::RobotState &  state,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is in collision (with the environment or self collision) If a group name is specified, collision checking is done for that group only (plus descendent links).

Definition at line 2190 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateColliding() [3/5]

bool planning_scene::PlanningScene::isStateColliding ( const std::string &  group = "",
bool  verbose = false 
)

Check if the current state is in collision (with the environment or self collision). If a group name is specified, collision checking is done for that group only (plus descendent links). Since the function is non-const, the current state transforms are updated before the collision check.

Definition at line 2198 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStateColliding() [4/5]

bool planning_scene::PlanningScene::isStateColliding ( const std::string &  group = "",
bool  verbose = false 
) const
inline

Check if the current state is in collision (with the environment or self collision). If a group name is specified, collision checking is done for that group only (plus descendent links). It is expected the current state transforms are up to date.

Definition at line 319 of file planning_scene.h.

◆ isStateColliding() [5/5]

bool planning_scene::PlanningScene::isStateColliding ( moveit::core::RobotState state,
const std::string &  group = "",
bool  verbose = false 
) const
inline

Check if a given state is in collision (with the environment or self collision) If a group name is specified, collision checking is done for that group only (plus descendent links). The link transforms for state are updated before the collision check.

Definition at line 328 of file planning_scene.h.

Here is the call graph for this function:

◆ isStateConstrained() [1/4]

bool planning_scene::PlanningScene::isStateConstrained ( const moveit::core::RobotState state,
const kinematic_constraints::KinematicConstraintSet constr,
bool  verbose = false 
) const

Check if a given state satisfies a set of constraints.

Definition at line 2270 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateConstrained() [2/4]

bool planning_scene::PlanningScene::isStateConstrained ( const moveit::core::RobotState state,
const moveit_msgs::msg::Constraints &  constr,
bool  verbose = false 
) const

Check if a given state satisfies a set of constraints.

Definition at line 2246 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateConstrained() [3/4]

bool planning_scene::PlanningScene::isStateConstrained ( const moveit_msgs::msg::RobotState &  state,
const kinematic_constraints::KinematicConstraintSet constr,
bool  verbose = false 
) const

Check if a given state satisfies a set of constraints.

Definition at line 2262 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateConstrained() [4/4]

bool planning_scene::PlanningScene::isStateConstrained ( const moveit_msgs::msg::RobotState &  state,
const moveit_msgs::msg::Constraints &  constr,
bool  verbose = false 
) const

Check if a given state satisfies a set of constraints.

Definition at line 2238 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStateFeasible() [1/2]

bool planning_scene::PlanningScene::isStateFeasible ( const moveit::core::RobotState state,
bool  verbose = false 
) const

Check if a given state is feasible, in accordance to the feasibility predicate specified by setStateFeasibilityPredicate(). Returns true if no feasibility predicate was specified.

Definition at line 2231 of file planning_scene.cpp.

◆ isStateFeasible() [2/2]

bool planning_scene::PlanningScene::isStateFeasible ( const moveit_msgs::msg::RobotState &  state,
bool  verbose = false 
) const

Check if a given state is feasible, in accordance to the feasibility predicate specified by setStateFeasibilityPredicate(). Returns true if no feasibility predicate was specified.

Definition at line 2220 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStateValid() [1/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit::core::RobotState state,
const kinematic_constraints::KinematicConstraintSet constr,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is valid. This means checking for collisions, feasibility and whether the user specified validity conditions hold as well. Includes descendent links of group.

Definition at line 2306 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateValid() [2/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit::core::RobotState state,
const moveit_msgs::msg::Constraints &  constr,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is valid. This means checking for collisions, feasibility and whether the user specified validity conditions hold as well. Includes descendent links of group.

Definition at line 2296 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateValid() [3/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit::core::RobotState state,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is valid. This means checking for collisions and feasibility. Includes descendent links of group.

Definition at line 2276 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateValid() [4/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit_msgs::msg::RobotState &  state,
const moveit_msgs::msg::Constraints &  constr,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is valid. This means checking for collisions, feasibility and whether the user specified validity conditions hold as well. Includes descendent links of group.

Definition at line 2288 of file planning_scene.cpp.

Here is the call graph for this function:

◆ isStateValid() [5/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit_msgs::msg::RobotState &  state,
const std::string &  group = "",
bool  verbose = false 
) const

Check if a given state is valid. This means checking for collisions and feasibility. Includes descendent links of group.

Definition at line 2282 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knowsFrameTransform() [1/2]

bool planning_scene::PlanningScene::knowsFrameTransform ( const moveit::core::RobotState state,
const std::string &  id 
) const

Check if a transform to the frame id is known. This will be known if id is a link name, an attached body id or a collision object.

Definition at line 2054 of file planning_scene.cpp.

Here is the call graph for this function:

◆ knowsFrameTransform() [2/2]

bool planning_scene::PlanningScene::knowsFrameTransform ( const std::string &  id) const

Check if a transform to the frame id is known. This will be known if id is a link name, an attached body id or a collision object.

Definition at line 2049 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadGeometryFromStream() [1/2]

bool planning_scene::PlanningScene::loadGeometryFromStream ( std::istream &  in)

Load the geometry of the planning scene from a stream.

Definition at line 1082 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadGeometryFromStream() [2/2]

bool planning_scene::PlanningScene::loadGeometryFromStream ( std::istream &  in,
const Eigen::Isometry3d &  offset 
)

Load the geometry of the planning scene from a stream at a certain location using offset.

Definition at line 1087 of file planning_scene.cpp.

Here is the call graph for this function:

◆ operator=()

PlanningScene & planning_scene::PlanningScene::operator= ( const PlanningScene )
delete

PlanningScene cannot be copy-assigned.

◆ printKnownObjects()

void planning_scene::PlanningScene::printKnownObjects ( std::ostream &  out = std::cout) const

Outputs debug information about the planning scene contents.

Definition at line 2505 of file planning_scene.cpp.

Here is the call graph for this function:

◆ processAttachedCollisionObjectMsg()

bool planning_scene::PlanningScene::processAttachedCollisionObjectMsg ( const moveit_msgs::msg::AttachedCollisionObject &  object)

Definition at line 1530 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processCollisionObjectMsg()

bool planning_scene::PlanningScene::processCollisionObjectMsg ( const moveit_msgs::msg::CollisionObject &  object)

Definition at line 1768 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ processOctomapMsg() [1/2]

void planning_scene::PlanningScene::processOctomapMsg ( const octomap_msgs::msg::Octomap &  map)

Definition at line 1432 of file planning_scene.cpp.

Here is the call graph for this function:

◆ processOctomapMsg() [2/2]

void planning_scene::PlanningScene::processOctomapMsg ( const octomap_msgs::msg::OctomapWithPose &  map)

Definition at line 1472 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processOctomapPtr()

void planning_scene::PlanningScene::processOctomapPtr ( const std::shared_ptr< const octomap::OcTree > &  octree,
const Eigen::Isometry3d &  t 
)

Definition at line 1495 of file planning_scene.cpp.

◆ processPlanningSceneWorldMsg()

bool planning_scene::PlanningScene::processPlanningSceneWorldMsg ( const moveit_msgs::msg::PlanningSceneWorld &  world)

Definition at line 1391 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pushDiffs()

void planning_scene::PlanningScene::pushDiffs ( const PlanningScenePtr &  scene)

If there is a parent specified for this scene, then the diffs with respect to that parent are applied to a specified planning scene, whatever that scene may be. If there is no parent specified, this function is a no-op.

Definition at line 338 of file planning_scene.cpp.

Here is the call graph for this function:

◆ removeAllCollisionObjects()

void planning_scene::PlanningScene::removeAllCollisionObjects ( )

Clear all collision objects in planning scene.

Definition at line 1458 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeObjectColor()

void planning_scene::PlanningScene::removeObjectColor ( const std::string &  id)

Definition at line 2184 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ removeObjectType()

void planning_scene::PlanningScene::removeObjectType ( const std::string &  id)

Definition at line 2099 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ saveGeometryToStream()

void planning_scene::PlanningScene::saveGeometryToStream ( std::ostream &  out) const

Save the geometry of the planning scene to a stream, as plain text.

Definition at line 1038 of file planning_scene.cpp.

Here is the call graph for this function:

◆ setAllowedCollisionMatrix()

void planning_scene::PlanningScene::setAllowedCollisionMatrix ( const collision_detection::AllowedCollisionMatrix acm)

Set the allowed collision matrix.

Definition at line 661 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAttachedBodyUpdateCallback()

void planning_scene::PlanningScene::setAttachedBodyUpdateCallback ( const moveit::core::AttachedBodyCallback callback)

Set the callback to be triggered when changes are made to the current scene state.

Definition at line 638 of file planning_scene.cpp.

◆ setCollisionObjectUpdateCallback()

void planning_scene::PlanningScene::setCollisionObjectUpdateCallback ( const collision_detection::World::ObserverCallbackFn callback)

Set the callback to be triggered when changes are made to the current scene world.

Definition at line 645 of file planning_scene.cpp.

◆ setCurrentState() [1/2]

void planning_scene::PlanningScene::setCurrentState ( const moveit::core::RobotState state)

Set the current robot state.

Definition at line 1245 of file planning_scene.cpp.

Here is the call graph for this function:

◆ setCurrentState() [2/2]

void planning_scene::PlanningScene::setCurrentState ( const moveit_msgs::msg::RobotState &  state)

Set the current robot state to be state. If not all joint values are specified, the previously maintained joint values are kept.

Definition at line 1212 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMotionFeasibilityPredicate()

void planning_scene::PlanningScene::setMotionFeasibilityPredicate ( const MotionFeasibilityFn fn)
inline

Specify a predicate that decides whether motion segments are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation.

Definition at line 767 of file planning_scene.h.

◆ setName()

void planning_scene::PlanningScene::setName ( const std::string &  name)
inline

Set the name of the planning scene.

Definition at line 125 of file planning_scene.h.

Here is the caller graph for this function:

◆ setObjectColor()

void planning_scene::PlanningScene::setObjectColor ( const std::string &  id,
const std_msgs::msg::ColorRGBA &  color 
)

Definition at line 2166 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setObjectType()

void planning_scene::PlanningScene::setObjectType ( const std::string &  id,
const object_recognition_msgs::msg::ObjectType &  type 
)

Definition at line 2092 of file planning_scene.cpp.

Here is the caller graph for this function:

◆ setPlanningSceneDiffMsg()

bool planning_scene::PlanningScene::setPlanningSceneDiffMsg ( const moveit_msgs::msg::PlanningScene &  scene)

Apply changes to this planning scene as diffs, even if the message itself is not marked as being a diff (is_diff member). A parent is not required to exist. However, the existing data in the planning instance is not cleared. Data from the message is only appended (and in cases such as e.g., the robot state, is overwritten).

Definition at line 1309 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPlanningSceneMsg()

bool planning_scene::PlanningScene::setPlanningSceneMsg ( const moveit_msgs::msg::PlanningScene &  scene)

Set this instance of a planning scene to be the same as the one serialized in the scene message, even if the message itself is marked as being a diff (is_diff member)

Definition at line 1362 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStateFeasibilityPredicate()

void planning_scene::PlanningScene::setStateFeasibilityPredicate ( const StateFeasibilityFn fn)
inline

Specify a predicate that decides whether states are considered valid or invalid for reasons beyond ones covered by collision checking and constraint evaluation. This is useful for setting up problem specific constraints (e.g., stability)

Definition at line 753 of file planning_scene.h.

◆ shapesAndPosesFromCollisionObjectMessage()

bool planning_scene::PlanningScene::shapesAndPosesFromCollisionObjectMessage ( const moveit_msgs::msg::CollisionObject &  object,
Eigen::Isometry3d &  object_pose_in_header_frame,
std::vector< shapes::ShapeConstPtr > &  shapes,
EigenSTL::vector_Isometry3d &  shape_poses 
)

Takes the object message and returns the object pose, shapes and shape poses. If the object pose is empty (identity) but the shape pose is set, this uses the shape pose as the object pose. The shape pose becomes the identity instead.

Definition at line 1794 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usePlanningSceneMsg()

bool planning_scene::PlanningScene::usePlanningSceneMsg ( const moveit_msgs::msg::PlanningScene &  scene)

Call setPlanningSceneMsg() or setPlanningSceneDiffMsg() depending on how the is_diff member of the message is set.

Definition at line 1400 of file planning_scene.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ CollisionDetector

friend struct CollisionDetector
friend

Enumerates the available collision detectors.

Definition at line 966 of file planning_scene.h.

Member Data Documentation

◆ DEFAULT_SCENE_NAME

const std::string planning_scene::PlanningScene::DEFAULT_SCENE_NAME = "(noname)"
static

Definition at line 114 of file planning_scene.h.

◆ OCTOMAP_NS

const std::string planning_scene::PlanningScene::OCTOMAP_NS = "<octomap>"
static

Definition at line 113 of file planning_scene.h.


The documentation for this class was generated from the following files: