Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private 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]

Classes

struct  CollisionDetector
 

Public Member Functions

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. More...
 
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. More...
 
PlanningScenePtr diff () const
 Return a new child PlanningScene that uses this one as parent. More...
 
PlanningScenePtr diff (const moveit_msgs::PlanningScene &msg) const
 Return a new child PlanningScene that uses this one as parent and has the diffs specified by msg applied. More...
 
bool getAttachedCollisionObjectMsg (moveit_msgs::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. More...
 
void getAttachedCollisionObjectMsgs (std::vector< moveit_msgs::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. More...
 
bool getCollisionObjectMsg (moveit_msgs::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. More...
 
void getCollisionObjectMsgs (std::vector< moveit_msgs::CollisionObject > &collision_objs) const
 Construct a vector of messages (collision_objects) with the collision object data for all objects in planning_scene. More...
 
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. The resulting costs are stored in costs. More...
 
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. More...
 
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. The resulting costs are stored in costs. More...
 
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. More...
 
const moveit::core::RobotStategetCurrentState () const
 Get the state at which the robot is assumed to be. More...
 
moveit::core::RobotStategetCurrentStateNonConst ()
 Get the state at which the robot is assumed to be. More...
 
moveit::core::RobotStatePtr getCurrentStateUpdated (const moveit_msgs::RobotState &update) const
 Get a copy of the current state with components overwritten by the state message update. More...
 
void getKnownObjectColors (ObjectColorMap &kc) const
 
void getKnownObjectTypes (ObjectTypeMap &kc) const
 
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. More...
 
const std::string & getName () const
 Get the name of the planning scene. This is empty by default. More...
 
const std_msgs::ColorRGBA & getObjectColor (const std::string &id) const
 
void getObjectColorMsgs (std::vector< moveit_msgs::ObjectColor > &object_colors) const
 Construct a vector of messages (object_colors) with the colors of the objects from the planning_scene. More...
 
const object_recognition_msgs::ObjectType & getObjectType (const std::string &id) const
 
bool getOctomapMsg (octomap_msgs::OctomapWithPose &octomap) const
 Construct a message (octomap) with the octomap data from the planning_scene. More...
 
const PlanningSceneConstPtr & getParent () const
 Get the parent scene (whith respect to which the diffs are maintained). This may be empty. More...
 
void getPlanningSceneDiffMsg (moveit_msgs::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() More...
 
void getPlanningSceneMsg (moveit_msgs::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() More...
 
void getPlanningSceneMsg (moveit_msgs::PlanningScene &scene, const moveit_msgs::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. More...
 
const moveit::core::RobotModelConstPtr & getRobotModel () const
 Get the kinematic model for which the planning scene is maintained. More...
 
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. More...
 
bool hasObjectColor (const std::string &id) const
 
bool hasObjectType (const std::string &id) const
 
bool isPathValid (const moveit_msgs::RobotState &start_state, const moveit_msgs::RobotTrajectory &trajectory, const moveit_msgs::Constraints &path_constraints, const moveit_msgs::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. More...
 
bool isPathValid (const moveit_msgs::RobotState &start_state, const moveit_msgs::RobotTrajectory &trajectory, const moveit_msgs::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. More...
 
bool isPathValid (const moveit_msgs::RobotState &start_state, const moveit_msgs::RobotTrajectory &trajectory, const moveit_msgs::Constraints &path_constraints, const std::vector< moveit_msgs::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. More...
 
bool isPathValid (const moveit_msgs::RobotState &start_state, const moveit_msgs::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) More...
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const moveit_msgs::Constraints &path_constraints, const moveit_msgs::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. More...
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const moveit_msgs::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). More...
 
bool isPathValid (const robot_trajectory::RobotTrajectory &trajectory, const moveit_msgs::Constraints &path_constraints, const std::vector< moveit_msgs::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. More...
 
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) More...
 
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. More...
 
bool isStateConstrained (const moveit::core::RobotState &state, const moveit_msgs::Constraints &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints. More...
 
bool isStateConstrained (const moveit_msgs::RobotState &state, const kinematic_constraints::KinematicConstraintSet &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints. More...
 
bool isStateConstrained (const moveit_msgs::RobotState &state, const moveit_msgs::Constraints &constr, bool verbose=false) const
 Check if a given state satisfies a set of constraints. More...
 
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. More...
 
bool isStateFeasible (const moveit_msgs::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. More...
 
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. More...
 
bool isStateValid (const moveit::core::RobotState &state, const moveit_msgs::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. More...
 
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. More...
 
bool isStateValid (const moveit_msgs::RobotState &state, const moveit_msgs::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. More...
 
bool isStateValid (const moveit_msgs::RobotState &state, const std::string &group="", bool verbose=false) const
 Check if a given state is valid. This means checking for collisions and feasibility. More...
 
bool loadGeometryFromStream (std::istream &in)
 Load the geometry of the planning scene from a stream. More...
 
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. More...
 
 PlanningScene (const moveit::core::RobotModelConstPtr &robot_model, const collision_detection::WorldPtr &world=std::make_shared< collision_detection::World >())
 construct using an existing RobotModel More...
 
 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. More...
 
void printKnownObjects (std::ostream &out=std::cout) const
 Outputs debug information about the planning scene contents. More...
 
bool processAttachedCollisionObjectMsg (const moveit_msgs::AttachedCollisionObject &object)
 
bool processCollisionObjectMsg (const moveit_msgs::CollisionObject &object)
 
void processOctomapMsg (const octomap_msgs::Octomap &map)
 
void processOctomapMsg (const octomap_msgs::OctomapWithPose &map)
 
void processOctomapPtr (const std::shared_ptr< const octomap::OcTree > &octree, const Eigen::Isometry3d &t)
 
bool processPlanningSceneWorldMsg (const moveit_msgs::PlanningSceneWorld &world)
 
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. More...
 
void removeAllCollisionObjects ()
 Clear all collision objects in planning scene. More...
 
void removeObjectColor (const std::string &id)
 
void removeObjectType (const std::string &id)
 
void saveGeometryToStream (std::ostream &out) const
 Save the geometry of the planning scene to a stream, as plain text. More...
 
void setAttachedBodyUpdateCallback (const moveit::core::AttachedBodyCallback &callback)
 Set the callback to be triggered when changes are made to the current scene state. More...
 
void setCollisionObjectUpdateCallback (const collision_detection::World::ObserverCallbackFn &callback)
 Set the callback to be triggered when changes are made to the current scene world. More...
 
void setCurrentState (const moveit::core::RobotState &state)
 Set the current robot state. More...
 
void setCurrentState (const moveit_msgs::RobotState &state)
 Set the current robot state to be state. If not all joint values are specified, the previously maintained joint values are kept. More...
 
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.
More...
 
void setName (const std::string &name)
 Set the name of the planning scene. More...
 
void setObjectColor (const std::string &id, const std_msgs::ColorRGBA &color)
 
void setObjectType (const std::string &id, const object_recognition_msgs::ObjectType &type)
 
bool setPlanningSceneDiffMsg (const moveit_msgs::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). More...
 
bool setPlanningSceneMsg (const moveit_msgs::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) More...
 
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) More...
 
bool shapesAndPosesFromCollisionObjectMessage (const moveit_msgs::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. More...
 
bool usePlanningSceneMsg (const moveit_msgs::PlanningScene &scene)
 Call setPlanningSceneMsg() or setPlanningSceneDiffMsg() depending on how the is_diff member of the message is set. More...
 
 ~PlanningScene ()
 
Reasoning about frames
const std::string & getPlanningFrame () const
 Get the frame in which planning is performed. More...
 
const moveit::core::TransformsgetTransforms () const
 Get the set of fixed transforms from known frames to the planning frame. More...
 
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. More...
 
moveit::core::TransformsgetTransformsNonConst ()
 Get the set of fixed transforms from known frames to the planning frame. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
Reasoning about the geometry of the planning scene
void addCollisionDetector (const collision_detection::CollisionDetectorAllocatorPtr &allocator)
 Add a new collision detector type. More...
 
void setActiveCollisionDetector (const collision_detection::CollisionDetectorAllocatorPtr &allocator, bool exclusive=false)
 Set the type of collision detector to use. Calls addCollisionDetector() to add it if it has not already been added. More...
 
bool setActiveCollisionDetector (const std::string &collision_detector_name)
 Set the type of collision detector to use. This type must have already been added with addCollisionDetector(). More...
 
const std::string & getActiveCollisionDetectorName () const
 
void getCollisionDetectorNames (std::vector< std::string > &names) const
 get the types of collision detector that have already been added. These are the types which can be passed to setActiveCollisionDetector(). More...
 
const collision_detection::WorldConstPtr & getWorld () const
 Get the representation of the world. More...
 
const collision_detection::WorldPtr & getWorldNonConst ()
 
const collision_detection::CollisionEnvConstPtr & getCollisionEnv () const
 Get the active collision environment. More...
 
const collision_detection::CollisionEnvConstPtr & getCollisionEnvUnpadded () const
 Get the active collision detector for the robot. More...
 
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. More...
 
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. More...
 
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. NOTE: After modifying padding and scale on the active robot call propogateRobotPadding() to copy it to all the other collision detectors. More...
 
void propogateRobotPadding ()
 Copy scale and padding from active CollisionRobot to other CollisionRobots. This should be called after any changes are made to the scale or padding of the active CollisionRobot. This has no effect on the unpadded CollisionRobots. More...
 
const collision_detection::AllowedCollisionMatrixgetAllowedCollisionMatrix () const
 Get the allowed collision matrix. More...
 
collision_detection::AllowedCollisionMatrixgetAllowedCollisionMatrixNonConst ()
 Get the allowed collision matrix. More...
 
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. Since the function is non-const, the current state transforms are updated before the collision check. More...
 
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. It is expected the current state transforms are up to date. More...
 
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. The link transforms for state are updated before the collision check. More...
 
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. It is expected that the link transforms of state are up to date. More...
 
bool isStateColliding (const moveit_msgs::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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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). More...
 
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. More...
 
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.
More...
 
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.
More...
 
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. More...
 
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. More...
 
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.
More...
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res)
 Check whether the current state is in self collision. More...
 
void checkSelfCollision (const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res) const
 Check whether the current state is in self collision. More...
 
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. More...
 
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. More...
 
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. More...
 
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) More...
 
void getCollidingLinks (std::vector< std::string > &links)
 Get the names of the links that are involved in collisions for the current state. More...
 
void getCollidingLinks (std::vector< std::string > &links) const
 Get the names of the links that are involved in collisions for the current state. More...
 
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. More...
 
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. More...
 
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) More...
 
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) More...
 
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. More...
 
void getCollidingPairs (collision_detection::CollisionResult::ContactMap &contacts) const
 Get the names of the links that are involved in collisions for the current state. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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) More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 
static bool isEmpty (const moveit_msgs::PlanningScene &msg)
 Check if a message includes any information about a planning scene, or it is just a default, empty message. More...
 
static bool isEmpty (const moveit_msgs::PlanningSceneWorld &msg)
 Check if a message includes any information about a planning scene world, or it is just a default, empty message. More...
 
static bool isEmpty (const moveit_msgs::RobotState &msg)
 Check if a message includes any information about a robot state, or it is just a default, empty message. More...
 

Static Public Attributes

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

Private Types

using CollisionDetectorConstIterator = std::map< std::string, CollisionDetectorPtr >::const_iterator
 
using CollisionDetectorIterator = std::map< std::string, CollisionDetectorPtr >::iterator
 

Private Member Functions

void allocateCollisionDetectors ()
 
void allocateCollisionDetectors (CollisionDetector &detector)
 
void initialize ()
 
 MOVEIT_STRUCT_FORWARD (CollisionDetector)
 
 PlanningScene (const PlanningSceneConstPtr &parent)
 
bool processCollisionObjectAdd (const moveit_msgs::CollisionObject &object)
 
bool processCollisionObjectMove (const moveit_msgs::CollisionObject &object)
 
bool processCollisionObjectRemove (const moveit_msgs::CollisionObject &object)
 
bool readPoseFromText (std::istream &in, Eigen::Isometry3d &pose) const
 
void writePoseToText (std::ostream &out, const Eigen::Isometry3d &pose) const
 

Static Private Member Functions

static moveit::core::RobotModelPtr createRobotModel (const urdf::ModelInterfaceSharedPtr &urdf_model, const srdf::ModelConstSharedPtr &srdf_model)
 
static void poseMsgToEigen (const geometry_msgs::Pose &msg, Eigen::Isometry3d &out)
 

Private Attributes

collision_detection::AllowedCollisionMatrixPtr acm_
 
CollisionDetectorPtr active_collision_
 
std::map< std::string, CollisionDetectorPtr > collision_
 
moveit::core::AttachedBodyCallback current_state_attached_body_callback_
 
collision_detection::World::ObserverCallbackFn current_world_object_update_callback_
 
collision_detection::World::ObserverHandle current_world_object_update_observer_handle_
 
MotionFeasibilityFn motion_feasibility_
 
std::string name_
 
std::unique_ptr< ObjectColorMapobject_colors_
 
std::unique_ptr< ObjectTypeMapobject_types_
 
PlanningSceneConstPtr parent_
 
moveit::core::RobotModelConstPtr robot_model_
 
moveit::core::RobotStatePtr robot_state_
 
moveit::core::TransformsPtr scene_transforms_
 
StateFeasibilityFn state_feasibility_
 
collision_detection::WorldPtr world_
 
collision_detection::WorldConstPtr world_const_
 
collision_detection::WorldDiffPtr world_diff_
 

Friends

struct CollisionDetector
 

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 202 of file planning_scene.h.

Member Typedef Documentation

◆ CollisionDetectorConstIterator

using planning_scene::PlanningScene::CollisionDetectorConstIterator = std::map<std::string, CollisionDetectorPtr>::const_iterator
private

Definition at line 1141 of file planning_scene.h.

◆ CollisionDetectorIterator

using planning_scene::PlanningScene::CollisionDetectorIterator = std::map<std::string, CollisionDetectorPtr>::iterator
private

Definition at line 1140 of file planning_scene.h.

Constructor & Destructor Documentation

◆ PlanningScene() [1/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 146 of file planning_scene.cpp.

◆ PlanningScene() [2/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 153 of file planning_scene.cpp.

◆ ~PlanningScene()

planning_scene::PlanningScene::~PlanningScene ( )

Definition at line 170 of file planning_scene.cpp.

◆ PlanningScene() [3/3]

planning_scene::PlanningScene::PlanningScene ( const PlanningSceneConstPtr &  parent)
private

Definition at line 202 of file planning_scene.cpp.

Member Function Documentation

◆ addCollisionDetector()

void planning_scene::PlanningScene::addCollisionDetector ( const collision_detection::CollisionDetectorAllocatorPtr &  allocator)

Add a new collision detector type.

A 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 ve used together.

This does nothing if this type of collision detector has already been added.

A new PlanningScene contains an FCL collision detector. This FCL collision detector will always be available unless it is removed by calling setActiveCollisionDetector() with exclusive=true.

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

Definition at line 283 of file planning_scene.cpp.

◆ allocateCollisionDetectors() [1/2]

void planning_scene::PlanningScene::allocateCollisionDetectors ( )
private

◆ allocateCollisionDetectors() [2/2]

void planning_scene::PlanningScene::allocateCollisionDetectors ( CollisionDetector detector)
private

◆ 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 494 of file planning_scene.cpp.

◆ checkCollision() [2/6]

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

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

Definition at line 494 of file planning_scene.h.

◆ 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 503 of file planning_scene.cpp.

◆ 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 519 of file planning_scene.cpp.

◆ checkCollision() [5/6]

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

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 501 of file planning_scene.h.

◆ 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
inline

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 517 of file planning_scene.h.

◆ 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 532 of file planning_scene.cpp.

◆ checkCollisionUnpadded() [2/6]

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

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

Definition at line 539 of file planning_scene.h.

◆ checkCollisionUnpadded() [3/6]

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

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

Definition at line 547 of file planning_scene.h.

◆ 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 541 of file planning_scene.cpp.

◆ checkCollisionUnpadded() [5/6]

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

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 557 of file planning_scene.h.

◆ 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
inline

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 568 of file planning_scene.h.

◆ 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 510 of file planning_scene.cpp.

◆ checkSelfCollision() [2/6]

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

Check whether the current state is in self collision.

Definition at line 586 of file planning_scene.h.

◆ checkSelfCollision() [3/6]

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

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

Definition at line 601 of file planning_scene.h.

◆ 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
inline

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

Definition at line 620 of file planning_scene.h.

◆ checkSelfCollision() [5/6]

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

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

Definition at line 593 of file planning_scene.h.

◆ 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
inline

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 610 of file planning_scene.h.

◆ 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 397 of file planning_scene.cpp.

◆ 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 238 of file planning_scene.cpp.

◆ createRobotModel()

moveit::core::RobotModelPtr planning_scene::PlanningScene::createRobotModel ( const urdf::ModelInterfaceSharedPtr &  urdf_model,
const srdf::ModelConstSharedPtr srdf_model 
)
staticprivate

Definition at line 192 of file planning_scene.cpp.

◆ 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 1237 of file planning_scene.cpp.

◆ 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 246 of file planning_scene.cpp.

◆ diff() [2/2]

PlanningScenePtr planning_scene::PlanningScene::diff ( const moveit_msgs::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 251 of file planning_scene.cpp.

◆ 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 731 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 764 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 722 of file planning_scene.h.

◆ 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 754 of file planning_scene.h.

◆ 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 746 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 783 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 738 of file planning_scene.h.

◆ 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 773 of file planning_scene.h.

◆ getActiveCollisionDetectorName()

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

Definition at line 387 of file planning_scene.h.

◆ getAllowedCollisionMatrix()

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

Get the allowed collision matrix.

Definition at line 442 of file planning_scene.h.

◆ getAllowedCollisionMatrixNonConst()

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

Get the allowed collision matrix.

Definition at line 643 of file planning_scene.cpp.

◆ getAttachedCollisionObjectMsg()

bool planning_scene::PlanningScene::getAttachedCollisionObjectMsg ( moveit_msgs::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 852 of file planning_scene.cpp.

◆ getAttachedCollisionObjectMsgs()

void planning_scene::PlanningScene::getAttachedCollisionObjectMsgs ( std::vector< moveit_msgs::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 868 of file planning_scene.cpp.

◆ 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 579 of file planning_scene.cpp.

◆ 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 632 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 646 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 587 of file planning_scene.cpp.

◆ 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 639 of file planning_scene.h.

◆ 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 653 of file planning_scene.h.

◆ 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 556 of file planning_scene.cpp.

◆ 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 670 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.

Definition at line 564 of file planning_scene.cpp.

◆ 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.

Definition at line 677 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.

Definition at line 697 of file planning_scene.h.

◆ 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.

Definition at line 686 of file planning_scene.h.

◆ getCollisionDetectorNames()

void planning_scene::PlanningScene::getCollisionDetectorNames ( std::vector< std::string > &  names) const

get the types of collision detector that have already been added. These are the types which can be passed to setActiveCollisionDetector().

Definition at line 359 of file planning_scene.cpp.

◆ getCollisionEnv() [1/2]

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

Get the active collision environment.

Definition at line 411 of file planning_scene.h.

◆ 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 368 of file planning_scene.cpp.

◆ 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. NOTE: After modifying padding and scale on the active robot call propogateRobotPadding() to copy it to all the other collision detectors.

Definition at line 604 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 417 of file planning_scene.h.

◆ 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 382 of file planning_scene.cpp.

◆ getCollisionObjectMsg()

bool planning_scene::PlanningScene::getCollisionObjectMsg ( moveit_msgs::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 803 of file planning_scene.cpp.

◆ getCollisionObjectMsgs()

void planning_scene::PlanningScene::getCollisionObjectMsgs ( std::vector< moveit_msgs::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 840 of file planning_scene.cpp.

◆ 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. The resulting costs are stored in costs.

Definition at line 2410 of file planning_scene.cpp.

◆ 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 2404 of file planning_scene.cpp.

◆ 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. The resulting costs are stored in costs.

Definition at line 2370 of file planning_scene.cpp.

◆ 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 2364 of file planning_scene.cpp.

◆ 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 261 of file planning_scene.h.

◆ getCurrentStateNonConst()

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

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

Definition at line 609 of file planning_scene.cpp.

◆ getCurrentStateUpdated()

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

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

Definition at line 620 of file planning_scene.cpp.

◆ 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 1989 of file planning_scene.cpp.

◆ 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 1981 of file planning_scene.cpp.

◆ 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 1976 of file planning_scene.cpp.

◆ 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 321 of file planning_scene.h.

◆ getKnownObjectColors()

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

Definition at line 2095 of file planning_scene.cpp.

◆ getKnownObjectTypes()

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

Definition at line 2061 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 947 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 220 of file planning_scene.h.

◆ getObjectColor()

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

Definition at line 2081 of file planning_scene.cpp.

◆ getObjectColorMsgs()

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

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

Definition at line 897 of file planning_scene.cpp.

◆ getObjectType()

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

Definition at line 2034 of file planning_scene.cpp.

◆ getOctomapMsg()

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

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

Definition at line 876 of file planning_scene.cpp.

◆ getParent()

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

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

Definition at line 248 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 278 of file planning_scene.h.

◆ getPlanningSceneDiffMsg()

void planning_scene::PlanningScene::getPlanningSceneDiffMsg ( moveit_msgs::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 671 of file planning_scene.cpp.

◆ getPlanningSceneMsg() [1/2]

void planning_scene::PlanningScene::getPlanningSceneMsg ( moveit_msgs::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 912 of file planning_scene.cpp.

◆ getPlanningSceneMsg() [2/2]

void planning_scene::PlanningScene::getPlanningSceneMsg ( moveit_msgs::PlanningScene &  scene,
const moveit_msgs::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 933 of file planning_scene.cpp.

◆ 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 254 of file planning_scene.h.

◆ 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 933 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.

◆ 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 285 of file planning_scene.h.

◆ getTransformsNonConst()

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

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

Definition at line 657 of file planning_scene.cpp.

◆ getWorld()

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

Get the representation of the world.

Definition at line 397 of file planning_scene.h.

◆ getWorldNonConst()

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

Definition at line 404 of file planning_scene.h.

◆ hasObjectColor()

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

Definition at line 2071 of file planning_scene.cpp.

◆ hasObjectType()

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

Definition at line 2024 of file planning_scene.cpp.

◆ initialize()

void planning_scene::PlanningScene::initialize ( )
private

Definition at line 176 of file planning_scene.cpp.

◆ isEmpty() [1/3]

bool planning_scene::PlanningScene::isEmpty ( const moveit_msgs::PlanningScene &  msg)
static

Check if a message includes any information about a planning scene, or it is just a default, empty message.

Definition at line 131 of file planning_scene.cpp.

◆ isEmpty() [2/3]

bool planning_scene::PlanningScene::isEmpty ( const moveit_msgs::PlanningSceneWorld &  msg)
static

Check if a message includes any information about a planning scene world, or it is just a default, empty message.

Definition at line 141 of file planning_scene.cpp.

◆ isEmpty() [3/3]

bool planning_scene::PlanningScene::isEmpty ( const moveit_msgs::RobotState &  msg)
static

Check if a message includes any information about a robot state, or it is just a default, empty message.

Definition at line 136 of file planning_scene.cpp.

◆ isPathValid() [1/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::RobotState &  start_state,
const moveit_msgs::RobotTrajectory &  trajectory,
const moveit_msgs::Constraints &  path_constraints,
const moveit_msgs::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.

Definition at line 2259 of file planning_scene.cpp.

◆ isPathValid() [2/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::RobotState &  start_state,
const moveit_msgs::RobotTrajectory &  trajectory,
const moveit_msgs::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.

Definition at line 2250 of file planning_scene.cpp.

◆ isPathValid() [3/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::RobotState &  start_state,
const moveit_msgs::RobotTrajectory &  trajectory,
const moveit_msgs::Constraints &  path_constraints,
const std::vector< moveit_msgs::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.

Definition at line 2269 of file planning_scene.cpp.

◆ isPathValid() [4/8]

bool planning_scene::PlanningScene::isPathValid ( const moveit_msgs::RobotState &  start_state,
const moveit_msgs::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)

Definition at line 2241 of file planning_scene.cpp.

◆ isPathValid() [5/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const moveit_msgs::Constraints &  path_constraints,
const moveit_msgs::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.

Definition at line 2339 of file planning_scene.cpp.

◆ isPathValid() [6/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const moveit_msgs::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).

Definition at line 2348 of file planning_scene.cpp.

◆ isPathValid() [7/8]

bool planning_scene::PlanningScene::isPathValid ( const robot_trajectory::RobotTrajectory trajectory,
const moveit_msgs::Constraints &  path_constraints,
const std::vector< moveit_msgs::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.

Definition at line 2282 of file planning_scene.cpp.

◆ 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)

Definition at line 2356 of file planning_scene.cpp.

◆ 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. It is expected that the link transforms of state are up to date.

Definition at line 2138 of file planning_scene.cpp.

◆ isStateColliding() [2/5]

bool planning_scene::PlanningScene::isStateColliding ( const moveit_msgs::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.

Definition at line 2123 of file planning_scene.cpp.

◆ 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. Since the function is non-const, the current state transforms are updated before the collision check.

Definition at line 2130 of file planning_scene.cpp.

◆ 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. It is expected the current state transforms are up to date.

Definition at line 464 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. The link transforms for state are updated before the collision check.

Definition at line 473 of file planning_scene.h.

◆ 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 2194 of file planning_scene.cpp.

◆ isStateConstrained() [2/4]

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

Check if a given state satisfies a set of constraints.

Definition at line 2174 of file planning_scene.cpp.

◆ isStateConstrained() [3/4]

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

Check if a given state satisfies a set of constraints.

Definition at line 2186 of file planning_scene.cpp.

◆ isStateConstrained() [4/4]

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

Check if a given state satisfies a set of constraints.

Definition at line 2166 of file planning_scene.cpp.

◆ 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 2159 of file planning_scene.cpp.

◆ isStateFeasible() [2/2]

bool planning_scene::PlanningScene::isStateFeasible ( const moveit_msgs::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 2148 of file planning_scene.cpp.

◆ 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.

Definition at line 2230 of file planning_scene.cpp.

◆ isStateValid() [2/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit::core::RobotState state,
const moveit_msgs::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.

Definition at line 2220 of file planning_scene.cpp.

◆ 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.

Definition at line 2200 of file planning_scene.cpp.

◆ isStateValid() [4/5]

bool planning_scene::PlanningScene::isStateValid ( const moveit_msgs::RobotState &  state,
const moveit_msgs::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.

Definition at line 2212 of file planning_scene.cpp.

◆ isStateValid() [5/5]

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

Check if a given state is valid. This means checking for collisions and feasibility.

Definition at line 2206 of file planning_scene.cpp.

◆ 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 2012 of file planning_scene.cpp.

◆ 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 2007 of file planning_scene.cpp.

◆ loadGeometryFromStream() [1/2]

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

Load the geometry of the planning scene from a stream.

Definition at line 1041 of file planning_scene.cpp.

◆ 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 1046 of file planning_scene.cpp.

◆ MOVEIT_STRUCT_FORWARD()

planning_scene::PlanningScene::MOVEIT_STRUCT_FORWARD ( CollisionDetector  )
private

◆ poseMsgToEigen()

void planning_scene::PlanningScene::poseMsgToEigen ( const geometry_msgs::Pose &  msg,
Eigen::Isometry3d &  out 
)
staticprivate

convert Pose msg to Eigen::Isometry, normalizing the quaternion part if necessary.

Definition at line 1750 of file planning_scene.cpp.

◆ printKnownObjects()

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

Outputs debug information about the planning scene contents.

Definition at line 2423 of file planning_scene.cpp.

◆ processAttachedCollisionObjectMsg()

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

Definition at line 1511 of file planning_scene.cpp.

◆ processCollisionObjectAdd()

bool planning_scene::PlanningScene::processCollisionObjectAdd ( const moveit_msgs::CollisionObject &  object)
private

Definition at line 1849 of file planning_scene.cpp.

◆ processCollisionObjectMove()

bool planning_scene::PlanningScene::processCollisionObjectMove ( const moveit_msgs::CollisionObject &  object)
private

Definition at line 1914 of file planning_scene.cpp.

◆ processCollisionObjectMsg()

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

Definition at line 1725 of file planning_scene.cpp.

◆ processCollisionObjectRemove()

bool planning_scene::PlanningScene::processCollisionObjectRemove ( const moveit_msgs::CollisionObject &  object)
private

Definition at line 1893 of file planning_scene.cpp.

◆ processOctomapMsg() [1/2]

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

Definition at line 1417 of file planning_scene.cpp.

◆ processOctomapMsg() [2/2]

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

Definition at line 1455 of file planning_scene.cpp.

◆ processOctomapPtr()

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

Definition at line 1478 of file planning_scene.cpp.

◆ processPlanningSceneWorldMsg()

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

Definition at line 1380 of file planning_scene.cpp.

◆ propogateRobotPadding()

void planning_scene::PlanningScene::propogateRobotPadding ( )

Copy scale and padding from active CollisionRobot to other CollisionRobots. This should be called after any changes are made to the scale or padding of the active CollisionRobot. This has no effect on the unpadded CollisionRobots.

Definition at line 264 of file planning_scene.cpp.

◆ 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 437 of file planning_scene.cpp.

◆ readPoseFromText()

bool planning_scene::PlanningScene::readPoseFromText ( std::istream &  in,
Eigen::Isometry3d &  pose 
) const
private

Definition at line 1175 of file planning_scene.cpp.

◆ removeAllCollisionObjects()

void planning_scene::PlanningScene::removeAllCollisionObjects ( )

Clear all collision objects in planning scene.

Definition at line 1443 of file planning_scene.cpp.

◆ removeObjectColor()

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

Definition at line 2117 of file planning_scene.cpp.

◆ removeObjectType()

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

Definition at line 2055 of file planning_scene.cpp.

◆ saveGeometryToStream()

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

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

The .scene file format allows simple saving/loading of PlanningScene collision objects (see Format of .scene files)

Definition at line 999 of file planning_scene.cpp.

◆ setActiveCollisionDetector() [1/2]

void planning_scene::PlanningScene::setActiveCollisionDetector ( const collision_detection::CollisionDetectorAllocatorPtr &  allocator,
bool  exclusive = false 
)

Set the type of collision detector to use. Calls addCollisionDetector() to add it if it has not already been added.

If exclusive is true then all other collision detectors will be removed and only this one will be available.

example: to use FCL collision call planning_scene->setActiveCollisionDetector(collision_detection::CollisionDetectorAllocatorFCL::create());

Definition at line 316 of file planning_scene.cpp.

◆ setActiveCollisionDetector() [2/2]

bool planning_scene::PlanningScene::setActiveCollisionDetector ( const std::string &  collision_detector_name)

Set the type of collision detector to use. This type must have already been added with addCollisionDetector().

Returns true on success, false if collision_detector_name is not the name of a collision detector that has been previously added with addCollisionDetector().

Definition at line 341 of file planning_scene.cpp.

◆ 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 627 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 634 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 1232 of file planning_scene.cpp.

◆ setCurrentState() [2/2]

void planning_scene::PlanningScene::setCurrentState ( const moveit_msgs::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 1199 of file planning_scene.cpp.

◆ 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 940 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 226 of file planning_scene.h.

◆ setObjectColor()

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

Definition at line 2105 of file planning_scene.cpp.

◆ setObjectType()

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

Definition at line 2048 of file planning_scene.cpp.

◆ setPlanningSceneDiffMsg()

bool planning_scene::PlanningScene::setPlanningSceneDiffMsg ( const moveit_msgs::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 1297 of file planning_scene.cpp.

◆ setPlanningSceneMsg()

bool planning_scene::PlanningScene::setPlanningSceneMsg ( const moveit_msgs::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 1351 of file planning_scene.cpp.

◆ 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 926 of file planning_scene.h.

◆ shapesAndPosesFromCollisionObjectMessage()

bool planning_scene::PlanningScene::shapesAndPosesFromCollisionObjectMessage ( const moveit_msgs::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 1766 of file planning_scene.cpp.

◆ usePlanningSceneMsg()

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

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

Definition at line 1389 of file planning_scene.cpp.

◆ writePoseToText()

void planning_scene::PlanningScene::writePoseToText ( std::ostream &  out,
const Eigen::Isometry3d &  pose 
) const
private

Definition at line 1192 of file planning_scene.cpp.

Friends And Related Function Documentation

◆ CollisionDetector

friend struct CollisionDetector
friend

Definition at line 1138 of file planning_scene.h.

Member Data Documentation

◆ acm_

collision_detection::AllowedCollisionMatrixPtr planning_scene::PlanningScene::acm_
private

Definition at line 1170 of file planning_scene.h.

◆ active_collision_

CollisionDetectorPtr planning_scene::PlanningScene::active_collision_
private

Definition at line 1168 of file planning_scene.h.

◆ collision_

std::map<std::string, CollisionDetectorPtr> planning_scene::PlanningScene::collision_
private

Definition at line 1167 of file planning_scene.h.

◆ current_state_attached_body_callback_

moveit::core::AttachedBodyCallback planning_scene::PlanningScene::current_state_attached_body_callback_
private

Definition at line 1155 of file planning_scene.h.

◆ current_world_object_update_callback_

collision_detection::World::ObserverCallbackFn planning_scene::PlanningScene::current_world_object_update_callback_
private

Definition at line 1164 of file planning_scene.h.

◆ current_world_object_update_observer_handle_

collision_detection::World::ObserverHandle planning_scene::PlanningScene::current_world_object_update_observer_handle_
private

Definition at line 1165 of file planning_scene.h.

◆ DEFAULT_SCENE_NAME

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

Definition at line 215 of file planning_scene.h.

◆ motion_feasibility_

MotionFeasibilityFn planning_scene::PlanningScene::motion_feasibility_
private

Definition at line 1173 of file planning_scene.h.

◆ name_

std::string planning_scene::PlanningScene::name_
private

Definition at line 1146 of file planning_scene.h.

◆ object_colors_

std::unique_ptr<ObjectColorMap> planning_scene::PlanningScene::object_colors_
private

Definition at line 1175 of file planning_scene.h.

◆ object_types_

std::unique_ptr<ObjectTypeMap> planning_scene::PlanningScene::object_types_
private

Definition at line 1178 of file planning_scene.h.

◆ OCTOMAP_NS

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

Definition at line 214 of file planning_scene.h.

◆ parent_

PlanningSceneConstPtr planning_scene::PlanningScene::parent_
private

Definition at line 1148 of file planning_scene.h.

◆ robot_model_

moveit::core::RobotModelConstPtr planning_scene::PlanningScene::robot_model_
private

Definition at line 1150 of file planning_scene.h.

◆ robot_state_

moveit::core::RobotStatePtr planning_scene::PlanningScene::robot_state_
private

Definition at line 1152 of file planning_scene.h.

◆ scene_transforms_

moveit::core::TransformsPtr planning_scene::PlanningScene::scene_transforms_
private

Definition at line 1159 of file planning_scene.h.

◆ state_feasibility_

StateFeasibilityFn planning_scene::PlanningScene::state_feasibility_
private

Definition at line 1172 of file planning_scene.h.

◆ world_

collision_detection::WorldPtr planning_scene::PlanningScene::world_
private

Definition at line 1161 of file planning_scene.h.

◆ world_const_

collision_detection::WorldConstPtr planning_scene::PlanningScene::world_const_
private

Definition at line 1162 of file planning_scene.h.

◆ world_diff_

collision_detection::WorldDiffPtr planning_scene::PlanningScene::world_diff_
private

Definition at line 1163 of file planning_scene.h.


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


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Tue Dec 24 2024 03:27:16