Skip to content

Selecting Robots

Adnan Munawar edited this page Jan 27, 2021 · 7 revisions

Selecting Robots

There are two ways to load robots described via ADF:

  1. Loading ADFs specified in the launch file by using the integer indices.
  2. Loading ADFs without the launch file by providing the explicit filename(s).

1. Loading ADFs specified in the Launch File:

This a brief overview of the ambf/ambf_models/descriptions/launch.yaml file. If we take a look at the block multi-body configs, we can see the existing multi-body config files that have been defined for AMBF. There are of course additional Robots and Multibodies that are defined in the (ambf/ambf_model/descriptions/multi-bodies)[https://github.com/WPI-AIM/ambf/tree/master/ambf_models/descriptions/multi-bodies]* folder. These can be added to multibody config block and even you can create your own Robot/Multi-Bodies that can be appended to the multibody config block. It's worth paying attention to the comments after each multibody file. These are indexes that can be used to load the specific multibody in the simulator and are there only to assist in counting.

# This is the base file for Coordination Application
world config: ./world/world.yaml
color config: ./color/colors.yaml
input devices config: ./input_devices/input_devices.yaml
multibody configs:
  - "./multi-bodies/robots/blender-toy-car.yaml" #0
  - "./multi-bodies/robots/blender-toy-car2.yaml" #1
  - "./multi-bodies/robots/blender-neuro-robot.yaml" #2
  - "./multi-bodies/robots/blender-raven2.yaml" #3
  - "./multi-bodies/robots/blender-mtm.yaml" #4
  - "./multi-bodies/robots/blender-psm.yaml" #5
  - "./multi-bodies/robots/blender-ecm.yaml" #6
  - "./multi-bodies/robots/blender-suj.yaml" #7
  - "./multi-bodies/robots/blender-kuka.yaml" #8
  - "./multi-bodies/robots/blender-pr2.yaml" #9
  - "./multi-bodies/puzzles/parallel_structure.yaml" #10
  - "./multi-bodies/puzzles/puzzle1.yaml" #11
  - "./multi-bodies/puzzles/puzzle2.yaml" #12

Now let's run the simulator as described in Launching the Simulator

2. Loading ADFs without the Launch file.

The second option is to use the -a flag. For example, if one has an ADF in the home directory /users/potato/tests/robot.yaml, this file can be launched directly as follows

cd ~/ambf/bin/<os>
./ambf_simulator -a /users/potato/tests/robot.yaml

Similarly, as is the case with the -l flag, multiple SDFs can be launch by comma-separated values. E.g.

cd ~/ambf/bin/<os>
./ambf_simulator -a /users/potato/tests/robot.yaml,/users/potato/tests/car.yaml

Make sure to not have a space between multiple ADF files above.

3. Note:

Lastly, the -l and -a flags can be used together to launch some files based on the index and some based on the filenames.

Clone this wiki locally