|
upkie
11.0.0
Open-source wheeled biped robots
|
Backend using PyBullet physics simulation. More...
Public Member Functions | |
| None | __init__ (self, float dt, bool gui=True, float inertia_variation=0.0, Optional[Dict[str, JointProperties]] joint_properties=None, str js_path="/dev/input/js0", Optional[Model] model=None, Optional[int] nb_substeps=None, float torque_control_kd=1.0, float torque_control_kp=20.0) |
| Initialize PyBullet backend. More... | |
| def | __del__ (self) |
| Disconnect PyBullet when deleting the backend instance. | |
| int | robot_id (self) |
| Identifier of the robot body in the PyBullet simulation. | |
| None | close (self) |
| Disconnect PyBullet properly. | |
| dict | reset (self, RobotState init_state) |
| Reset the PyBullet simulation and get an initial observation. More... | |
| dict | step (self, dict action) |
| Apply action and step the PyBullet simulation. More... | |
| dict | get_spine_observation (self) |
| Get observation in spine format from PyBullet simulation. More... | |
| float | compute_joint_torque (self, str joint_name, float feedforward_torque, float target_position, float target_velocity, float kp_scale, float kd_scale, float maximum_torque) |
| Reproduce the moteus position controller in PyBullet. More... | |
| None | randomize_inertias (self, float inertia_variation) |
| Randomize the inertias of all robot links. More... | |
| None | set_external_forces (self, Dict[str, ExternalForce] external_forces) |
| Set external forces to apply to robot links at next step. More... | |
| List[PointContact] | get_contact_points (self, Optional[str] link_name=None) |
| Get contact points from PyBullet simulation. More... | |
Public Attributes | |
| inertia_variation | |
| Relative variation applied to link masses and inertias for domain randomization. More... | |
| torque_control_kd | |
| Derivative gain for torque control. | |
| torque_control_kp | |
| Proportional gain for torque control. | |
| joystick | |
| Joystick interface for writing observations, or None if no joystick device was found. | |
Backend using PyBullet physics simulation.