gym_gz.context.gazebo#
gym_gz.context.gazebo.controllers#
- class gym_gz.context.gazebo.controllers.ComputedTorqueFixedBase(urdf, kp, ki, kd, joints, gravity=<factory>)#
Bases:
GazeboPlugin
-
gravity:
Tuple
[float
,float
,float
]#
-
joints:
List
[str
]#
-
kd:
List
[float
]#
-
ki:
List
[float
]#
-
kp:
List
[float
]#
- to_xml()#
Get the XML plugin content.
- Return type:
str
- Returns:
The XML plugin content.
-
urdf:
str
#
-
gravity:
gym_gz.context.gazebo.plugin#
- class gym_gz.context.gazebo.plugin.GazeboPlugin#
Bases:
ABC
Base class of all World and Model plugins for Gz sim.
The Plugin abstract class provides boilerplate code that simplifies and streamlines the definition of helper classes that insert Gz sim plugins to either World or Model objects.
Classes that inherit from Plugin have to provide the following information:
All the properties of the plugin as dataclass fields
The private specification of the plugin (plugin name and plugin class)
Optionally: the serialized XML context
Example:
plugin = MyPlugin(my_property=42) model = MyModel(world=my_world) model.insert_model_plugin(*plugin.args())
- args()#
Get the arguments passed to the ScenarI/O methods used to insert plugins.
- Return type:
Tuple
[str
,str
,str
]- Returns:
A tuple with the args required to insert the plugin.
- to_xml()#
Get the XML plugin content.
- Return type:
str
- Returns:
The XML plugin content.
- static wrap_in_sdf(context)#
Wrap the XML context inside a SDF root.
- Parameters:
context (
str
) – The XML string with the plugin’s context.- Return type:
str
- Returns:
The plugin’s context wrapped inside a SDF root.