Gazebo Sim

API Reference

10.5.0
DetachableJoint Class Reference

A system that initially attaches two models via a fixed joint and allows for the models to get detached during simulation via a topic. A model can be re-attached during simulation via a topic. The status of the detached state can be monitored via a topic as well. More...

#include <DetachableJoint.hh>

Public Member Functions

 DetachableJoint ()=default
 Documentation inherited.
 
void Configure (const Entity &_entity, const std::shared_ptr< const sdf::Element > &_sdf, EntityComponentManager &_ecm, EventManager &_eventMgr) final
 Documentation inherited.
 
void PreUpdate (const UpdateInfo &_info, EntityComponentManager &_ecm) final
 Documentation inherited.
 
- Public Member Functions inherited from System
 System ()=default
 Constructor.
 
virtual ~System ()=default
 Destructor.
 
- Public Member Functions inherited from ISystemConfigure
virtual ~ISystemConfigure ()=default
 
- Public Member Functions inherited from ISystemPreUpdate
virtual ~ISystemPreUpdate ()=default
 

Additional Inherited Members

- Public Types inherited from System
using PriorityType = int32_t
 Signed integer type used for specifying priority of the execution order of PreUpdate and Update phases.
 
- Static Public Attributes inherited from System
static constexpr PriorityType kDefaultPriority = {0}
 Default priority value for execution order of the PreUpdate and Update phases.
 
static constexpr std::string_view kPriorityElementName
 Name of the XML element from which the priority value will be parsed.
 

Detailed Description

A system that initially attaches two models via a fixed joint and allows for the models to get detached during simulation via a topic. A model can be re-attached during simulation via a topic. The status of the detached state can be monitored via a topic as well.

System Parameters

  • <parent_link>: Name of the link in the parent model to be used in creating a fixed joint with a link in the child model.
  • <child_model>: Name of the model to which this model will be connected
  • <child_link>: Name of the link in the child model to be used in creating a fixed joint with a link in the parent model.
  • <initial_attach> (optional): If true, the joint starts attached when the system loads. If false, the joint starts detached (no initial joint is created until an attach request is received). Defaults to true to preserve backward compatibility.
  • <topic> (optional): Topic name to be used for detaching connections. Using <detach_topic> is preferred.
  • <detach_topic> (optional): Topic name to be used for detaching connections. If multiple detachable plugin is used in one model, detach_topic is REQUIRED to detach child models individually.
  • <attach_topic> (optional): Topic name to be used for attaching connections. If multiple detachable plugin is used in one model, attach_topic is REQUIRED to attach child models individually.
  • <output_topic> (optional): Topic name to be used for publishing the state of the detachment. If multiple detachable plugin is used in one model, output_topic is REQUIRED to publish child models state individually.
  • <suppress_child_warning> (optional): If true, the system will not print a warning message if a child model does not exist yet. Otherwise, a warning message is printed. Defaults to false.

Constructor & Destructor Documentation

◆ DetachableJoint()

DetachableJoint ( )
default

Documentation inherited.

Member Function Documentation

◆ Configure()

void Configure ( const Entity &  _entity,
const std::shared_ptr< const sdf::Element > &  _sdf,
EntityComponentManager &  _ecm,
EventManager &  _eventMgr 
)
finalvirtual

Documentation inherited.

Implements ISystemConfigure.

◆ PreUpdate()

void PreUpdate ( const UpdateInfo &  _info,
EntityComponentManager &  _ecm 
)
finalvirtual

Documentation inherited.

Implements ISystemPreUpdate.


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