Post

Montecarlo Visual Loc

Montecarlo Visual Loc

These two weeks I’ve been updating the Montecarlo Visual Loc for future use. It was already 80% done by another person but they left around a year ago and I have to update it to the current Robotics Academy structure and finish it.

Exercise overview

The things I had to update and change can be divided in 2 parts, or 2 repositories:

  1. Robotics Infrastructure: It has the models and world used for the exercise. The previous developer had all models and textures done but over time they were lost, so I had to redo most of it.

  2. Robotics Academy: Here the exercise itself is stored. The 2 things I had to update mainly were HAL.py and GUI.py, since they were outdated. Each exercise have these 2 files which provides the hardware abstraction layer for various components (HAL) and various base GUI’s for easy development (GUI).

Adding models

There are 2 models used in the exercise, stored in the Robotics Infrastructure repository. The house_int2_roof model, which is the same as the house_int2 model but with a roof added to the house and roombaROS_cam, which is the same model as roombaROS but with a camera sensor pointing up. Both of these models were lost with time and I had to create them again.

To create roombaROS_cam model, I just took the roombaROS model and added this to the laser link.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<sensor name="camera" type="camera">
  <pose>0 0 0 0 -1.57 0</pose>
  <visualize>true</visualize>
  <update_rate>10</update_rate>
  <camera>
    <horizontal_fov>1.089</horizontal_fov>
    <image>
      <format>R8G8B8</format>
      <width>640</width>
      <height>480</height>
    </image>
    <clip>
      <near>0.05</near>
      <far>8.0</far>
    </clip>
  </camera>
  <plugin name="camera_controller" filename="libgazebo_ros_camera.so">
    <frame_name>laser</frame_name>
  </plugin>
</sensor>

For the house_int2_roof model, after adding the roof I had to add textures to different parts of the roof because the robot needs different visuals in every room to know where it is at all times. For that I divided the roof into different pieces for each room and changed the materials from Grey to different ones.

Roof Textures

I also added some simple shapes working as ceiling lamps to have more visual differences.

Ceiling Lamps

Updating HAL and GUI

The exercise is in the Robotics Academy repository, in exercises/static/exercises/name_of_the_exercise. It already had the hal.py and gui.py files but they were outdated. It was developed in ros 1 noetic and these 2 files were (inside the exercise folder) in python_template/ros1_noetic. I had to change it to python_template/ros2_humble. Then I updated both HAL and GUI files so the structure is the same to the ones in other exercises, using the gui_interfaces and hal_interfaces libraries, which are in the common folder in the same repository, the functions already implemented by the previous developer were already in other exercises in a more updated form so I just had to follow the structure of those functions.

Future goals

Other stuff to be done for the exercise is adding more functions to GUI so the user experience is better and creating a dummy solution of the exercise to quickly test it.

This post is licensed under CC BY 4.0 by the author.

Trending Tags