Due: 2024-12-03, 11:59pm
Overview and purpose
This assignment asks you to create software that determines a robot's position within a given map. The purpose is to give you some practice designing and implementing an algorithm for a simple form of mobile robot localization.Logistics
This assignment is intended to be completed in teams of size 3. Nevertheless, it may be completed in teams of size 1, 2, or 3. Expectations and grading standards will be the same regardless of team size. The instructor will not mediate conflicts between team members. Everyone on the team will be considered fully responsible for all of the submitted work. You should assign yourself to a team within the Canvas system —Use the People link within the course page— by noon on November 17. After this date, teams for this project will be final. If you are choosing to work alone, this step is still required; simply add yourself to a group with no other members.Your task
A differential drive robot moves over a floor composed of colored square tiles, some of which are light-colored and some of which are darker. When the robot is activated, it has access to a map showing the floor colors, but it does not know its own location.
- The robot is controlled by twist messages that contain linear and angular velocities. The robot's movements track somewhat closely to the given commanded velocities, but are noisy.
- The robot has a color sensor aimed downward at the floor. This sensor provides noisy measurements of the color the robot is moving over. Unfortunately, the sensor does not come with documentation about how to interpret its outputs.
- The robot has a compass that reports the robot's orientation with relatively high accuracy.
Input data
Here is a collection input files to test your system: This archive includes bag files of recorded sensor data. Each bag is associated with a world file, which is a YAML file that describes the floor the robot is operating on for that bag. You should provide the name of the appropriate world file to your system, using a parameter or some other method, at run time. Here is an example world file, including some comments documenting what you can expect:Contents of file: cave.world
The correspondence between bags and world files is shown in the table
below.
# Each cell is a square with this side length,
# measured in meters.
resolution: 1.2
# What does the floor look like?
# # = dark colored floor
# . = light colored floor
# Each non-empty line represents one row.
# Spaces and empty lines should be ignored.
#
# The origin of the 'world' frame is at the
# bottom left of this map, with its positive
# x-axis going to the right and its positive
# y-axis going up from there.
map: |
##################
###....#####.....#
#................#
#............#...#
##############...#
#####...###..#...#
##.......#.......#
###..............#
###...#........###
##....############
###.......###...##
###.............##
###....##.....####
##################
| Bag | World |
11 |
light.world |
12 |
dark.world |
13 |
windy.world |
14 |
windy.world |
15 |
code.world |
16 |
code.world |
17 |
cave.world |
| Bag | Starting Pose $(x, y, \theta)$ |
11 |
(2.21, 5.64, -0.70) |
12 |
(6.28, 3.13, -0.45) |
13 |
(9.80, 6.52, 1.67) |
Required outputs
You should construct a ROS system that publishes these outputs:- On the topic /floor, a message of typenav_msgs/msg/OccupancyGridcorrectly showing the map expressed in the given world file. You can check whether the map message is formed properly or not by visualizing it in rviz. This should be published every five seconds.
- On the topic /estimated_pose, a message of typegeometry_msgs/msg/Pose2Dproviding your algorithm's best estimate of the robot's current pose. Your program should publish its single best estimate of the robot's pose accounting for all of the available information, even if that information is insufficient to be particularly sure of the correct state. This should be published every two seconds.
What to submit
Three required parts:- A PDF report including:
- A concise description of how the system works. This should be a couple of paragraphs, describing your overall approach at a conceptual level. Some questions to consider: What choices did you make in designing the program, and why? What nodes does your system contain, and what role does each one play? What specific constants are part of your method, and how did you select values for those constants?
- An rviz screenshot demonstrating the correctness of your published
occupancy grids by showing cave.worldvisualized correctly.
- A short answer to these questions: Did the results meet your expectations? Why or why not?
- The source code for your program(s). This will span at least one source code files. Be sure to consult the source code style guide on the course Canvas page.
- Rosbag recordings of all topics throughout the entire execution
of your program for each of the provided input bags numbered 11
through 20. The directory of the bag file must
be named with your two digit group number for this project, followed by a
dash, followed by the number of the input bag file. For example, if you are
in group Group 3, your submission should include bag directories called
03-11,03-12, and so on. Incorrectly named bags will not be graded.
- A short video demonstrating your system in some way that may be helpful in grading.