Closed itaouil closed 7 months ago
Hi @itaouil,
As stated in the function documentation, this method fetches the joint-space state of the system from the current physics simulator used (PyBullet in this case). This means that you need to configure it using bullet simulation.
pb = configure_bullet_simulation(gui=True/False)
before trying to get the system state within the simulation.
I should clearly state this in the examples. Sorry, and thanks for catching this.
Added it to documentation in Readme:
from morpho_symm.utils.pybullet_visual_utils import configure_bullet_simulation
# Load robot to pybullet simulation environment. Robot state will be the simulation state.
bullet_client = configure_bullet_simulation(gui=True) # Start pybullet simulation
robot.configure_bullet_simulation(bullet_client, world=None) # Load robot in pybullet environment
# Get the state of the system
q, v = robot.get_state() # q ∈ Q, v ∈ TqQ
# Get the robot's base configuration XB ∈ E3 as a homogenous transformation matrix.
XB = robot.get_base_configuration()
# Get joint space position and velocity coordinates (q_js, v_js) | q_js ∈ Qjs, dq_js ∈ TqQjs
q_js, v_js = robot.get_joint_space_state()
Please note that the use of the pybullet simulator is not required for this repository.
While I utilized pybullet primarily for visualization purposes, practitioners are not limited to this particular physics simulator. The main value of the repository lies in the definitions of the group representations for each robot.
Future versions of the repository will aim to minimize development efforts towards integrating a specific physics simulator. Instead, the focus will be on providing group representations that can be utilized across various applications and physics simulators, according to user preference.
Hi,
When running the following example:
I get this error: