Ark
Loading...
Searching...
No Matches
pybullet_multibody.PyBulletMultiBody Class Reference
Inheritance diagram for pybullet_multibody.PyBulletMultiBody:
ark.system.component.sim_component.SimComponent ark.system.component.base_component.BaseComponent

Public Member Functions

None __init__ (self, str name, Any client, Dict[str, Any] global_config=None)
 get_object_data (self)
 Return the current state of the simulated object.
 pack_data (self, data_dict)
 Convert a state dictionary to a rigid_body_state_t message.
None reset_component (self, channel, msg)
 Reset the object pose using a message.
Public Member Functions inherited from ark.system.component.sim_component.SimComponent
None __init__ (self, str name, Dict[str, Any] global_config=None)
 step_component (self)
Public Member Functions inherited from ark.system.component.base_component.BaseComponent
None __init__ (self, str name, Union[str, Dict[str, Any], Path] global_config)
None component_channels_init (self, channels)

Public Attributes

 client = client
 ref_body_id
str publisher_name = self.name + "/ground_truth/sim"
 state_publisher = self.component_channels_init([(self.publisher_name, rigid_body_state_t)])
Public Attributes inherited from ark.system.component.sim_component.SimComponent
 config = self._load_config_section(global_config=global_config, name=name, type="objects")
 publish_ground_truth = self.config["publish_ground_truth"]
str reset_service_name = self.name + "/reset/sim/"
Public Attributes inherited from ark.system.component.base_component.BaseComponent
 name = name
 component_multi_publisher = self.create_multi_channel_publisher(channels)

Additional Inherited Members

Protected Attributes inherited from ark.system.component.base_component.BaseComponent
bool _is_suspended = False

Detailed Description

Utility class for creating PyBullet multi-body objects.

Constructor & Destructor Documentation

◆ __init__()

None pybullet_multibody.PyBulletMultiBody.__init__ ( self,
str name,
Any client,
Dict[str, Any] global_config = None )
Instantiate a PyBulletMultiBody object.

@param name Name of the object.
@param client Bullet client used for creation.
@param global_config Global configuration dictionary.
@return ``None``

Member Function Documentation

◆ get_object_data()

pybullet_multibody.PyBulletMultiBody.get_object_data ( self)

Return the current state of the simulated object.

Returns
Dictionary with position, orientation and velocities of the object. @rtype Dict[str, Any]

Reimplemented from ark.system.component.sim_component.SimComponent.

◆ pack_data()

pybullet_multibody.PyBulletMultiBody.pack_data ( self,
data_dict )

Convert a state dictionary to a rigid_body_state_t message.

Parameters
data_dictDictionary as returned by :func:get_object_data.
Returns
Mapping suitable for :class:MultiChannelPublisher. @rtype Dict[str, rigid_body_state_t]

Reimplemented from ark.system.component.sim_component.SimComponent.

◆ reset_component()

None pybullet_multibody.PyBulletMultiBody.reset_component ( self,
channel,
msg )

Reset the object pose using a message.

Parameters
channelLCM channel on which the reset request was received.
msgrigid_body_state_t containing the desired pose.
Returns
flag_t acknowledging the reset.

Reimplemented from ark.system.component.sim_component.SimComponent.

Member Data Documentation

◆ client

pybullet_multibody.PyBulletMultiBody.client = client

◆ publisher_name

str pybullet_multibody.PyBulletMultiBody.publisher_name = self.name + "/ground_truth/sim"

◆ ref_body_id

pybullet_multibody.PyBulletMultiBody.ref_body_id
Initial value:
= client.loadURDF(fileName=urdf_path,
basePosition=base_position,
baseOrientation=base_orientation,
globalScaling=global_scaling,
useMaximalCoordinates=1)

◆ state_publisher

pybullet_multibody.PyBulletMultiBody.state_publisher = self.component_channels_init([(self.publisher_name, rigid_body_state_t)])

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