Ark
Loading...
Searching...
No Matches
pybullet_robot_driver.BulletRobotDriver Class Reference
Inheritance diagram for pybullet_robot_driver.BulletRobotDriver:
ark.system.driver.robot_driver.SimRobotDriver ark.system.driver.robot_driver.RobotDriver ark.system.driver.component_driver.ComponentDriver

Public Member Functions

None __init__ (self, component_name=str, Dict[str, Any] component_config=None, Any client=None)
 Create a robot driver for PyBullet.
None load_robot (self, base_position=None, base_orientation=None, q_init=None)
 Load the robot model into the simulator.
bool check_torque_status (self)
 get infos ##
Dict[str, float] pass_joint_positions (self, List[str] joints)
 Return the current joint positions.
Dict[str, float] pass_joint_velocities (self, List[str] joints)
 Return the current joint velocities.
Dict[str, float] pass_joint_efforts (self, List[str] joints)
 Return the current joint efforts.
None pass_joint_group_control_cmd (self, str control_mode, Dict[str, float] cmd, **kwargs)
 control ##
None sim_reset (self, List[float] base_pos, List[float] base_orn, List[float] q_init)
 misc.
Public Member Functions inherited from ark.system.driver.robot_driver.SimRobotDriver
None __init__ (self, str component_name, Dict[str, Any] component_config=None, bool sim=True)
 Initialize the simulation driver.
None shutdown_driver (self)
 Shut down the simulation driver.
Public Member Functions inherited from ark.system.driver.robot_driver.RobotDriver
None __init__ (self, str component_name, Dict[str, Any] component_config=None, bool sim=True)
 Construct the driver.
Public Member Functions inherited from ark.system.driver.component_driver.ComponentDriver
None __init__ (self, str component_name, Any component_config=None, bool sim=True)
 Initialize the driver.
 is_sim (self)
 Return whether this driver is running in simulation mode.

Public Attributes

 client = client
 base_position = self.config.get("base_position", [0.0, 0.0, 0.0])
 base_orientation = self.config.get("base_orientation", [0.0, 0.0, 0.0, 1.0])
 initial_configuration = self.config.get("initial_configuration", [0.0] * self.client.getNumJoints(self.ref_body_id))
 num_joints = self.client.getNumJoints(self.ref_body_id)
dict bullet_joint_infos = {}
dict actuated_joints = {}
dict joints = {}
 ref_body_id
Public Attributes inherited from ark.system.driver.component_driver.ComponentDriver
 component_name = component_name
 config = self._load_single_section(component_config, component_name)
 sim = sim

Additional Inherited Members

Protected Member Functions inherited from ark.system.driver.component_driver.ComponentDriver
 _load_single_section (self, component_config, component_name)
 Load the configuration of a single component from a YAML file.

Detailed Description

Robot driver that interfaces with the PyBullet simulation.

Constructor & Destructor Documentation

◆ __init__()

None pybullet_robot_driver.BulletRobotDriver.__init__ ( self,
component_name = str,
Dict[str, Any] component_config = None,
Any client = None )

Create a robot driver for PyBullet.

Parameters
component_nameName of the robot component.
component_configConfiguration dictionary for the robot.
clientBullet client instance.
Returns
None

Member Function Documentation

◆ check_torque_status()

bool pybullet_robot_driver.BulletRobotDriver.check_torque_status ( self)

get infos ##

Return True as simulated robots are always torqued.

Returns
Always True in simulation. @rtype bool

Reimplemented from ark.system.driver.robot_driver.RobotDriver.

◆ load_robot()

None pybullet_robot_driver.BulletRobotDriver.load_robot ( self,
base_position = None,
base_orientation = None,
q_init = None )

Load the robot model into the simulator.

Parameters
base_positionOptional base position [x, y, z].
base_orientationOptional base orientation as quaternion.
q_initOptional list of initial joint positions.

◆ pass_joint_efforts()

Dict[str, float] pybullet_robot_driver.BulletRobotDriver.pass_joint_efforts ( self,
List[str] joints )

Return the current joint efforts.

Parameters
jointsList of joint names.
Returns
Dictionary from joint name to effort. @rtype Dict[str, float]

Reimplemented from ark.system.driver.robot_driver.RobotDriver.

◆ pass_joint_group_control_cmd()

None pybullet_robot_driver.BulletRobotDriver.pass_joint_group_control_cmd ( self,
str control_mode,
Dict[str, float] cmd,
** kwargs )

control ##

Send a control command to a group of joints.

Parameters
control_modeOne of position, velocity or torque.
cmdMapping from joint names to command values.
kwargsAdditional keyword arguments forwarded to PyBullet.
Returns
None

Reimplemented from ark.system.driver.robot_driver.RobotDriver.

◆ pass_joint_positions()

Dict[str, float] pybullet_robot_driver.BulletRobotDriver.pass_joint_positions ( self,
List[str] joints )

Return the current joint positions.

Parameters
jointsList of joint names.
Returns
Dictionary from joint name to position. @rtype Dict[str, float]

Reimplemented from ark.system.driver.robot_driver.RobotDriver.

◆ pass_joint_velocities()

Dict[str, float] pybullet_robot_driver.BulletRobotDriver.pass_joint_velocities ( self,
List[str] joints )

Return the current joint velocities.

Parameters
jointsList of joint names.
Returns
Dictionary from joint name to velocity. @rtype Dict[str, float]

Reimplemented from ark.system.driver.robot_driver.RobotDriver.

◆ sim_reset()

None pybullet_robot_driver.BulletRobotDriver.sim_reset ( self,
List[float] base_pos,
List[float] base_orn,
List[float] q_init )

misc.

##

Reset the robot in the simulator.

Parameters
base_posNew base position.
base_ornNew base orientation quaternion.
q_initList of joint positions after the reset.

Reimplemented from ark.system.driver.robot_driver.SimRobotDriver.

Member Data Documentation

◆ actuated_joints

dict pybullet_robot_driver.BulletRobotDriver.actuated_joints = {}

◆ base_orientation

pybullet_robot_driver.BulletRobotDriver.base_orientation = self.config.get("base_orientation", [0.0, 0.0, 0.0, 1.0])

◆ base_position

pybullet_robot_driver.BulletRobotDriver.base_position = self.config.get("base_position", [0.0, 0.0, 0.0])

◆ bullet_joint_infos

dict pybullet_robot_driver.BulletRobotDriver.bullet_joint_infos = {}

◆ client

pybullet_robot_driver.BulletRobotDriver.client = client

◆ initial_configuration

pybullet_robot_driver.BulletRobotDriver.initial_configuration = self.config.get("initial_configuration", [0.0] * self.client.getNumJoints(self.ref_body_id))

◆ joints

dict pybullet_robot_driver.BulletRobotDriver.joints = {}

◆ num_joints

pybullet_robot_driver.BulletRobotDriver.num_joints = self.client.getNumJoints(self.ref_body_id)

◆ ref_body_id

pybullet_robot_driver.BulletRobotDriver.ref_body_id

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