User Tools

Site Tools


teaching:se-kiba:plan-based-assignment

Homework: ROS packages for plan-based robot control

Installation

Please install the base ROS system according to the guide found here.

Getting Started

The beginner ROS tutorials given here cover the basic concepts for communication and the overall structure of a ROS program. Therefore, it is advisable to read them and try out the lessons shown there.

A familiarity with the rosbuild system and writing ROS nodes in C++ and/or Python is mandatory and important for the assignments during the seminar.

The following topics are especially important:

Workspace Setup

We have created a git repository for the code that you will develop. You can find it at https://github.com/ai-seminar/group-highlevel and add it to your ROS workspace with

rosws set group_highlevel --git https://github.com/ai-seminar/group-highlevel.git
rosws update
source ~/.bashrc

Assignment

To successfully pass this assignment, you must write a ROS node that communicates with a TurtleSim simulation and sends target poses to it.

This includes doing the following:

  • Write a .launch-file for starting the turtlesim_node node in the turtlesim package (this will automatically start the roscore master node if none is active)
  • Write a main function that starts the ROS node and connects it to the ROS master.
  • Go through a list of cities (*cities*, as defined in the assignment template) and make sure the turtle reaches all of these city coordinates (use a reasonably small threshold around the target city to check if it reached the target spot).
    • For this, you will need to write a controller in Lisp as you can only command the turtle velocity.
    • Change the background of the turtle visualization every time you reach a city to a random color
    • Output a message containing the city name every time you visit a city and start out to a new one using for example
      (roslisp:ros-info (seminar high-level) "Going to city ~a" city-name-string)

      with city-name-string being the city name.

  • Once all spots were visited, go back to the initial position.
  • Implement an interface for the /turtle1/color_sensor topic similar to the one reading the current turtle pose. Inside the controller loop, check this color value (currently under the turtle) and see if it is crossing one of it's former lines. If that is the case, increment a (global) counter and after the whole journey is over, output the number of times the turtle crossed it's own path.

To change the background color, inspect the /clear ROS service. The parameters can be set using the

(roslisp:set-param key value)

call. Afterwards, you have to call the /clear service. You can do this in Lisp using the roslisp call-service function:

(roslisp:call-service service type)

with respective service-name and -type.

Document the code you write (preferably in the GitHub Wiki) and add documentation strings to the implemented funtions.

For details concerning the TurtleSim package, consult the manual: TurtleSim manual page. For details about the assignment, look at the README.md file also shown in the GitHub main page for the repository: https://github.com/ai-seminar/group-highlevel

Side Notes

In order to get a better understanding of Lisp (and for reference purposes), the following links can support you while getting the grips of it:

teaching/se-kiba/plan-based-assignment.txt · Last modified: 2016/05/19 09:19 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki