Robot models for gym-ignition
These models have been mainly tuned and tested to work in Ignition Gazebo.
This repository can be installed with the pip
package manager as follows:
# From PyPI
pip3 install gym-ignition-models
# From the repository (always containing the most recent changes)
pip3 install git+https://github.com/dic-iit/gym-ignition-models.git
Only GNU/Linux distributions are currently supported.
If you use Ignition Gazebo, you need to execute the following commands (from outside the directory where you cloned this repository):
PKG_DIR=$(python -c "import gym_ignition_models, inspect, os; print(os.path.dirname(inspect.getfile(gym_ignition_models)))")
export SDF_PATH=$PKG_DIR:SDF_PATH
If you want to make this change persistent, add the lines above to your ~/.bashrc
.
Note: waiting an upstream fix, you also need to add to the IGN_FILE_PATH
environment variable all the directories that contain model's meshes.
If you're using the models from a Python program, we provide a helper function that updates the environment. Use the following code:
import gym_ignition_models
gym_ignition_models.setup_environment()
If you inspect the content of os.environ
after this call, you'll find the environment variables already exported.
You can use these models either with the standalone simulators, or find and import them in your Python code. Here below an Python example of the utility functions provided by the package:
import gym_ignition_models as m
print(f"Models have been installed in {m.get_models_path()}")
print(f"Available robots: {m.get_robot_names()}")
print("\nModel files:")
for robot_name in m.get_robot_names():
print(f"{robot_name}: {m.get_model_file(robot_name)}")
Robot Name | Screenshot |
---|---|
ground_plane |
|
cartpole |
|
pendulum |
|
iCubGazeboV2_5 iCubGazeboSimpleCollisionsV2_5 |
|
panda |
|
character |