Starting Development

2. Starting Development#

This section explains how to develop using the HSR simulator.

2.1. Simulator Startup#

  1. Run the following to configure the environment variables. Note that you must set the ROS_DOMAIN_ID yourself.

    $ ros2 daemon stop
    $ export ROS_DOMAIN_ID=XXX
    $ source /opt/ros/<ROS_DISTRO>/setup.bash
    
  2. Run the following to start the simulator.

    $ cd ~/hsr_ros2_ws/
    $ source install/setup.bash
    $ ros2 launch hsrb_gazebo_launch hsrb_apartment_no_objects_world.launch.py
    

    Note

    The simulator allows you to utilize various environments.

    After running ros2 launch hsrb_gazebo_launch, press the “Tab” key twice to view other launch files.

    Select the appropriate HSR and environment for your setup.

    For details on the provided environments, see here .

  3. Once the simulator launches, you will see two windows: Gazebo and RViz.

    ../_images/simulator_gazebo_initialization.png ../_images/simulator_rviz_initialization.png

Proceed with the simulator running throughout this section and beyond.

The next chapter explains how to use the Python interface.