🤖

Adding Robots to Your Simulation

This guide provides step-by-step instructions for adding a robot to your simulation environment. We'll be using the Franka robot library as an example, but you can also create custom robots (see the Custom Robots page linked below).

Prerequisites

Before you begin, ensure that:

Step 1: Update the Global Configuration

First, add the robot reference to your global configuration file:

simulator: 
  # Your existing simulator configuration remains here
  # ...

robots:
  - "robots/franka.yaml"  # Path to robot configuration file

Step 2: Create the Robot Configuration Directory

Create a folder structure as follows:

project_root/
├── config
│	├── global_config.yaml  # Contains simulator settings and component links
│	├── robots/             # Directory for all robot configurations
│	│   └── franka.yaml     # Franka robot configuration file
│	└── ... (other project files)
└── sim_node.py

Step 3: Configure the Robot

Create the franka.yaml file with the following configuration:

name: "Franka"
config:
  source: "urdf"
  urdf_path: "panda_with_gripper.urdf"
  class_dir: "../../ark_robots/ark_franka/franka_panda"
  frequency: 240  # Control frequency in Hz
  base_position:
    - 0
    - 0
    - 0.2
  base_orientation:  # Quaternion (x, y, z, w)
    - 0
    - 0
    - 0
    - 1
  use_fixed_base: true
  initial_configuration:  # Starting joint angles
    - 0
    - 0
    - 0
    - 0
    - 0
    - 0
    - 0
    - 0
    - 0
    - 0

Configuration Parameters Explained

Here's what each parameter in the configuration file means:


Running Your Simulation: What to Expect

After configuring your robot:

and you should now see a franka in the camera view:

Running Your Simulation: What to Expect

Use this checklist to ensure your robot is properly configured:

If everything checks out, when running sim_node.py you should see a Franka robot in the camera view:


Code can be found:

https://github.com/Robotics-Ark/franka_gym_example

Next Step