Abstract base for Behaviors that add a CollisionObject to the planning scene.
More...
|
| | AddCollisionObjectBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
| |
| | AddCollisionObjectBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< PlanningSceneBridge > bridge) |
| |
| | ~AddCollisionObjectBase () override=default |
| |
| virtual tl::expected< moveit_msgs::msg::CollisionObject, std::string > | buildCollisionObject ()=0 |
| | Build the CollisionObject to apply to the planning scene.
|
| |
| | AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
| |
| | ~AsyncBehaviorBase () override=default |
| |
| BT::NodeStatus | onStart () override |
| | Required implementation of BT::StatefulActionNode::onStart().
|
| |
| BT::NodeStatus | onRunning () override |
| | Required implementation of BT::StatefulActionNode::onRunning().
|
| |
| void | onHalted () override |
| | Required implementation of BT::StatefulActionNode::onHalted().
|
| |
| void | resetStatus () |
| | Resets the internal status of this node.
|
| |
| virtual tl::expected< void, std::string > | doHalt () |
| | Optionally implement additional work needed to cleanly interrupt the async process.
|
| |
| void | notifyCanHalt () |
| | Called when runAsync() finishes to notify onHalted() that the async process has finished.
|
| |
| | SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &behavior_context) |
| | Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
|
| |
| const std::shared_ptr< BehaviorContext > & | getBehaviorContext () const |
| |
Abstract base for Behaviors that add a CollisionObject to the planning scene.
Subclasses override buildCollisionObject() to produce the CollisionObject. The base class then validates the object (non-empty id, non-empty frame_id, equal-size subframe arrays), enforces operation = ADD, and commits the addition.
The Behavior has two operating modes selected by the planning_scene input port:
- Live scene mode (port unwired): the Behavior fetches the current planning scene from the
/get_planning_scene service, then commits by sending a diff to the /apply_planning_scene service. Service names are hard-coded; they are not exposed as ports. This is the default behavior.
- Supplied scene mode (port wired): the Behavior modifies the
moveit_msgs::PlanningScene message supplied on the port and writes the result back to the same port. No service calls are made.
Before adding the object, the Behavior looks for another entry in the planning scene with the same id. The id can already be present in two places: in the world (world.collision_objects), or attached to the robot (robot_state.attached_collision_objects).
- If a world entry with the same id already exists, the Behavior fails unless
overwrite is true, in which case the existing world entry is replaced.
- If an attached entry with the same id already exists, the Behavior fails regardless of
overwrite, and the caller must detach the object first. This Behavior never modifies the attached list.