Skip to content

Robot Simulation

The "Robot Simulation" section provides commands for launching the Indy robot model in a simulated environment using the Gazebo simulator. This can be useful for testing and developing robotic applications without the need for a physical robot.

Package Configuration

1
2
3
4
5
├── indy_gazebo
    └── indy_gazebo.launch.py
├── indy_moveit
    ├── ...
    └── launch ── indy_moveit_gazebo.launch.py

This section uses two packages: indy_gazebo and indy_moveit. The indy_gazebo package contains a description for a simulation robot, while indy_moveit contains moveit configuration to use moveit with simulation robots.

Launch

To start the Indy robot in Gazebo, the following command can be used. This will launch the Gazebo simulator with the Indy7 robot model loaded.

1
ros2 launch indy_gazebo indy_gazebo.launch.py indy_type:=indy7

Once the command is executed, a gazebo window and an Rviz window will start to run, and the result will show as in the below image.


To use Moveit and Servoing functionalities in the Gazebo simulator, there are two options: using Moveit or using Servoing. If you want to use Moveit, you can use the following command. This will launch the Gazebo simulator with the Indy7 robot model and Moveit loaded.

1
ros2 launch indy_moveit indy_moveit_gazebo.launch.py indy_type:=indy7

The result will be shown as in the below image.


Choose the Goal State, there are 2 predefined goals (HomePos and ZeroPos). And then, press Plan & Execute button. Robot will move to the goal position.


In Servoing mode, you can use joystick (ex: Xbox controller) or keyboard or other devices to control robot. First connect the device to your PC, install the required driver (if needed, with keyboard or Xbox controller you don’t need to install driver) and use the following command. This will launch the Gazebo simulator with the Indy7 robot model and Servoing loaded.

1
ros2 launch indy_moveit indy_moveit_gazebo.launch.py indy_type:=indy7 servo_mode:=true


If you use Servoing mode with Xbox controller, you can use the Dpad to control joint 2 and joint 4, while B and X control joint 6 and Y and A control joint 5. The left joystick, right joystick, LB, RB, LT, and RT are used to control the TCP.

Please run the following command to use Servoing mode with keyboard. This will convert keyboard input to joystick.

1
ros2 run indy_moveit servo_keyboard_input