Introduction

The purpose of this programming assignment is to work through all of the steps of creating a ROS package using Python. This project will not require the use of the Turtlebots, so you should be able to complete it outside of the robotics lab.

The goal of your project will be to create a Python node that is able to navigate a simulated 2D turtle to a designated goal location.

Skibot

The simulated robot you'll be working with for this project is Skibot. Skibot is very similar to turtlesim, with the key difference that the Skibot turtle has a physics-based motion model. Instead of directly setting the velocity of the turtle using geometry_msgs/Twist messages, you will apply forces using geometry_msgs/Wrench messages.

Your first step for this project is to clone the Skibot repository from Github (https://github.com/spragunr/skibot). Once you have cloned the package, you will need to place it in your catkin_ws, and build it using catkin_make. Skibot depends on Pygame, so you may need to install Pygame if it isn't already available on your system. Make sure you can interact with the simulator from the command line before starting work on your code.

Part 1 - Creating the Package

Follow the steps from the ROS Packages Lab to create a repository and package for this assignment. Your package should be named skibot_nav and it should depend on geometry_msgs, skibot, rospy and std_msgs.

Part 2 - Navigation

Create a Python file named skibot_nav_node.py that moves the skibot in a smooth trajectory to a designated goal location. Ultimately, the goal location will be provided through the mechanism of ROS services, but to get started you can just hard-code a goal location in your Python code. You should be able to test your node by starting the skibot_node node, then running skibot_nav_node.py.

If your code is correct, and your package is configured correctly, you should be able to type:

rosrun skibot_nav skibot_nav_node.py
and watch your skibot merrily navigate to the goal.

Part 3 - Navigation as a Service

The next step is to provide a mechanism for communicating goal locations to the skibot_nav node. We will accomplish this by converting the node you developed above into a ROS service provider.

Your modified node must meet the following requirements:

The following tutorials will be helpful in completing this portion of the assignment:

Once your service is running, you should be able to test it by making calls from the terminal:

$ rosservice call /move_skibot_to_point "goal_x: 3.0
goal_y: 2.0" 
success: True
$ rosservice call /move_skibot_to_point "goal_x: 3.0
goal_y: 25.0" 
success: False

I've also written a mouse-based ROS service client that you can use for testing: mouse_teleop.py.

Part 4 - Creating a Launch File

Create a launch file named skibot_nav.launch that handles starting the skibot node and the navigation service node. I should be able to test your code by typing:

roslaunch skibot_nav skibot_nav.launch
in the terminal, and then start making service requests.

Submitting

Submit by creating a release on Github with the tag "1.0.0" and the title "submission". Your submission will be graded on the basis of functionality, code-quality, documentatation, and adherence to ROS packaging standards.