robotics-upo / hunav_gazebo_wrapper

A ROS2 wrapper to use the HuNavSim with the Gazebo Simulator
MIT License
13 stars 9 forks source link

hunav_gazebo_wrapper

This is a work in progress version

A ROS2 wrapper to use the HuNavSim with the Gazebo Simulator (tested with ROS Humble and Gazebo 11). Different scenarios (a cafe, a warehouse, and a house) are included. A set of different human models are available too.

Wrapper functioning

The wrapper is based on two components:

Generator parameters

The hunav_gazebo_world_generator node has these parameters:

Plugin params

The plugin parameters are read as ROS2 parameters also by the hunav_gazebo_world_generator node, which is in charge of adding the plugin to the Gazebo world file.

An example snippet of the HuNavPlugin which is automatically inserted in the world file:

<plugin name="hunav_plugin" filename="libHuNavPlugin.so">
    <update_rate>100.0</update_rate>
    <robot_name>robot</robot_name>
    <use_gazebo_obs>True</use_gazebo_obs>
    <global_frame_to_publish>map</global_frame_to_publish>
    <use_navgoal_to_start>false</use_navgoal_to_start>
    <navgoal_topic>goal_pose</navgoal_topic>
    <ignore_models>
        <model>cafe</model>
        <model>ground_plane</model>
    </ignore_models>
</plugin>

Dependencies

Compilation

Example launching

Tips

The robot we used was the PMB2 ROS 2 from PAL Robotics, that is compatible with ROS Humble. You must install of the required packages for the PMB2 simulation from the PAL Robotics repositories.

At the moment of this update (March 2023), there is an issue in the ros2_control package from the apt ros-humble package server that will be solved in the next Humble sync.

To get the robot working and solve this issue, you will need to clone and build in your local workspace the following packages:

PAL Robotics mentioned in their documentation that the robot simulation is more reliable if Cyclone DDS is used. We have had some problems with this because in some simulations agents didn't work as planned, so we didn't use it. Altough if you want to test it yourself, you can install it by doing:

Then, you can use it by launching:

ros2 launch hunav_gazebo_wrapper pmb2_cafe.launch.py

TODOs

Acknowledgements

This work is partially supported by Programa Operativo FEDER Andalucia 2014-2020, Consejeria de Economía, Conocimiento y Universidades (DeepBot, PY20_00817) and the project NHoA (PLEC2021-007868) and NORDIC (TED2021-132476B-I00), funded by MCIN/AEI/10.13039/501100011033 and the European Union NextGenerationEU/PRTR.