This example showcases the some of the main features offered by the multi-purpose Domain Randomization plugin, namely:
- Change gravity 3D vector;
- Scale spawned model;
- Change individual link mass;
- Change individual joint properties, such as :
- Joint limits (angle, effort and velocity);
- Joint friction;
- Joint damping;
- Change joint PID controller P gain;
- Change individual link's visual colors.
Other documented features not showcased (for now) include:
- Change individual collision surface properties;
- Change individual link inertia tensor;
Every implemented feature has been mentioned or explored in recent literature, namely by OpenAI in their work on dexterous manipulation. We provide an Interface class for interacting with the plugin.
This example requires Shadow's Dexterous Hand to be spawned in simulation. For this, we have used ROS and the Gazebo-ROS bridge software gazebo_ros_pkgs -- installation instructions here. Finally we need Shadow's official robot description package. The latter needs to be downloaded to the active catkin workspace.
cd catkin_ws/src && git clone /~https://github.com/shadow-robot/sr_common.git
Open up two terminals in the root directory of the repository.
On terminal 1 launch ROS and gazebo server:
cd ~/workspace/gap/ &&
source setup.sh &&
roscore & rosrun gazebo_ros gazebo worlds/domain_randomization.world --verbose
On terminal 2 run:
# Spawn shadow hand
rosrun gazebo_ros spawn_model -file models/shadowhand_motor.urdf -urdf -model shadowhand
# Launch domain randomization example
./build/bin/dr_example