Homework 01 - Scan processing

Deadline: 25 February 2024, 23:59 CET (Monday labs) / 28 February 2024, 23:59 CET (Thursday labs)

Your task will be to implement first part of a reactive_controller node (located in student-packages/aro_reactive_control) that collects and processes 2D laser scanner data. As part of this task, you will implement ROS subscriber and publisher to access the data and provide the results. You can find a more detailed description of the individual sub-tasks below.

Responsible lecturer: Robert Pěnička (penicrob@fel.cvut.cz)


  1. Follow the instructions provided to install ARO ROS environment for the solution of all home works and a semestral work in Autonomous Robotics course.
  2. Run the simulation for HW_01 using command
    roslaunch aro_reactive_control hw01_sim.launch
  3. Find topic name and message type corresponding to data from a laser scanner. This is a device that takes range measurements using laser ranging technique. The laser is incrementally (but very quickly) rotated and a measurement is taken after each increment. Thus, a single scan contains multiple range measurements taken at different angles. Based on the data (ROS message) type, try to find documentation for the laser scanner data (e.g., using rosmsg show <msg_type> command, or more detailed documentation at http://wiki.ros.org/sensor_msgs).
  4. Implement node reactive_controller.py (located in aro_reactive_control/scripts) that will listen to the messages from the laser scanner and process each message. Follow the hints suggested by the #TODO HW 01 parts in the code. The node should be able to:
    1. Filter out possibly erroneous data (i.e. outside of the normal value range – see the message documentation).
    2. Find the minimum value among valid measurements for each of the following ranges of angles: right: [-90, -30), front: [-30, 30], left: (30, 90].
    3. Publish the computed data to the /reactive_control/sector_dists topic as aro_msgs/SectorDistances containing computed minimum distance in fields distance_right, distance_front and distance_left, respectively.

Visualization and local testing

Keyboard teleoperation

The launch file hw01_sim.launch starts the keyboard_teleop node that allows you to control the forward and angular velocity of the robot using keyboard keys (w / x increases/decreases forward velocity, a / d increases/decreases angular velocity and s sets both angular and forward velocity to zero). You can use this way of robot control to test the functionality of your node.

The keys are used to add an increment or decrement to current control inputs. Not holding any key means that the robot applies the set values of control inputs. You need to have the keyboard_teleop window focused to use the keyboard keys.

RViz visualization

The launch file hw01_sim.launch starts also a preconfigured RViz window that shows the map of the environment, visualizes data from the scanner and the robot itself. The data published on topic /reactive_control/sector_dists are visualized in a form of linear gauge in the upper part of the RViz window. Initially, these indicators will show zero values. Once you correctly implement the publishers, you will see the published values.

Local evaluation

Local evaluation of your solution can be run using

roslaunch aro_reactive_control hw01_eval.launch
This will start an evaluation script which provides data from the scanner and compares output of your script with reference solution. Once the evaluation is finished, the script prints results of the evaluation in the command line. The output of the evaluation for correct implementation should look like:


  • You can find most of the necessary information directly within the presentation for Lab 01.
  • The rest could be found using the mentioned commands or by following the provided links.

Submission and Evaluation

Run script aro_exploration/homeworks/create_hw01_package.sh to create an archive containing your implementation (reactive_controller.py) and upload it to upload system. The script reactive_controller.py must be “runnable” from the provided launch file hw01_eval.launch. 5 points will be awarded for a valid submission fulfilling all requirements in Assignment section.

Submissions are penalized by 10% for each initiated 24 hours after the deadline.
courses/aro/tutorials/homework01.txt · Last modified: 2024/03/20 11:03 by peckama2