- Matteo Pompilio
- Piero Burigana
- Merve Rana Kizil
In robotics/catkin_ws/src/first_project/ you can find the implementation of odometry and sector timing for a mobile car robot using ROS, working directly with raw vehicle and GPS data, at the Monza circuit.
-
Task 1: Odometry from Vehicle Data
- Process messages from vehicle sensors to compute odometry.
- Subscribes to
/speedsteertopic (geometry_msgs/PointStamped):y: speed (km/h)x: steering wheel angle (deg)
- Publishes odometry (
nav_msgs/Odometry) to/odomand broadcasts a TF transform fromodomtovehicle.
-
Task 2: Odometry from GPS
- Subscribes to
/swiftnav/front/gps_posetopic (sensor_msgs/NavSatFix). - Converts latitude, longitude, altitude to ECEF, then to local ENU coordinates.
- Publishes odometry (
nav_msgs/Odometry) to/gps_odomand broadcasts a TF transform fromodomtogps. - Allows manual configuration of reference point via launch file parameters (
lat_r,lon_r,alt_r).
- Subscribes to
-
Task 3: Sector Times and Speed
- Subscribes to both vehicle and GPS topics.
- Publishes sector time and average speed (custom message on
/sector_times).
-
Preparation
- All launch and config files are in the
launch/directory.
- All launch and config files are in the
-
Start the System
-
Use the included launch file (automatically starts all nodes and RViz visualization):
roslaunch first_project launch.launch
-
-
Play the ROS Bag File
-
Run the bag file containing recorded data:
rosbag play --clock data/project.bag
-
-
Visualization
- ROS Noetic
- RViz for visualization
- Bag file:
project.bag
src/– Source code for all nodes.launch/– Launch files to start the system and RViz.cfg/– RViz configuration files.
In robotics/catkin_ws/src/second_project/ you can find the implementation of a mapping and navigation pipeline for a mobile robot using ROS.
-
Task 1: Mapping
- Use two 2D LiDAR scans and robot odometry from a ROS bag to reconstruct an environment map
- Data topics:
/scan_back,/scan_front,/odometry,/tf,/tf_static - Merge the two lasers for 360° coverage and filter out points belonging to the robot
- At first, we used the gmapping package, which works on a Grid-based Rao-Blackwellized Particle Filter SLAM; then, we tried to improve our mapping by the slam-toolbox package, which exploits the power of Pose Graph SLAM, with slightly better results, tuning the numerous parameters by trial-and-error
- Export the map as pgm, .png images and as .data, .posegraph and .yaml files
-
Task 2: Navigation
- Simulate the robot in Stage using the generated map.
- Setup navigation stack to localize and plan using the static map.
- Drive to goals loaded from a CSV file, published via a custom node using ROS actions.
- Visualize in RViz: robot, map, TFs, particle cloud (AMCL), paths, goals (you can also manually send goals via the Navigation toolset).
-
Mapping
-
Edit and use the launch files in
launch/:roslaunch second_project mapping.launch
-
Play the bag file:
rosbag play --clock data/robotics2.bag
-
Save the map using map_server and the serial formats using serialize_map from slam-toolbox:
rosrun map_server map_saver -f ./catkin_ws/src/second_project/map/map rosservice call /slam_toolbox/serialize_map "{filename: '/home/robotics/catkin_ws/src/second_project/map/map'}" -
Lastly, crop and clean the map using GIMP:
-
-
Navigation
-
Visualization
- On Windows, connect to http://localhost:8080/vnc.html
- RViz configuration files are provided in
rviz/. - View the map, robot, sensors, and navigation status.
- Alternatively, you can visualize everything by using Floxglove, and by running it:
roslaunch foxglove_bridge foxglove_bridge.launch port:=8765 address:=0.0.0.0
- ROS Noetic
- Mapping package: slam-toolbox
- Stage simulator
- Additional ROS packages:
map_server,move_base,amcl - RViz for visualization
- Bag file:
robotics2.bag, in the/robotics/datafolder
mapping/– Source and launch files for Task 1.navigation/– Source and launch files for Task 2.map/– Output map files.csv/– File with navigation goals.rviz/– RViz configs.config/– Configuration files for move_base and local/global planners.launch/– Launch files to start the system and RViz.stage/– Stage simulation files.




