Objectives

This homework will demonstrate your understanding of odometry on differential drive robots. You will create your own package, node, and launch file to interact with a package provided in the class repo. A ROS bagfile has been provided that contains the distances two wheels on a differential drive robot have traveled at each time step. Note that this is the incremental update to the distance traveled by the wheels, not the wheel ticks. Another node has been provided that takes in world x, y, theta points and graphs them. You need to fill in the gap. Assume that the baseline between wheels 2L=0.1m (so L=0.05m) and wheel distances are given in meters.

  1. Create a new ROS package in your repo for this assignment. EECE.5560 students may also wish to use this package for Lab2 Part 2.
  2. Create a node in this package that
    1. Subscribes to the output topic of the bagfile described below: /dist_wheel. This topic gives you the distance each wheel travels in that time step.
    2. Publishes the pose of the robot after this time step to the topic /pose.
  3. Create a launch file that starts your code and the launch file provided in the odometry_hw package.
  4. Modify the homework 6 launcher script to start your code.

Given ROS Package

A ROS package, odometry_hw, has been provided for you in the class template repo in the EECE5560 folder. You should not need to modify this package except (possibly) in one specific place noted below. The package contains:

    1. odom_hw.bag: A bag file with saved ROS messages publishing to the “/dist_wheel” topic. You will want to subscribe to this topic.
    2. odom_graph.py: A node for receiving the output of this assignment and graphing it on the screen. It subscribes to the “/pose” topic. The output from your node should publish to this topic.
    3. odom_hw.launch: A launch file that plays the bagfile and starts odom_graph.
      Note: the bagfile will start playing regardless of when your node is ready. By default, the bagfile waits 5 seconds before it starts to play. If your laptop runs a bit slowly then you may want to modify this delay time. To do this, change the number (seconds of delay) after -d in the following line in this launch file:

      <node pkg="rosbag" name="player" type="play" args="-d 5 --clock $(find odometry_hw)/odom_hw.bag" />
    4. Two message types:
      1. DistWheel.msg: the output type from the rosbag and input to your node
      2. Pose2D.msg the output type from your node and input to odom_graph.py
    5. Another launch file (record_rosbag.launch) and node (wheel_tick_pub.py) that can be used to record the bagfile if need be. This should not be required.

Submission Instructions

Turn in to Blackboard:

  1. The URL for your git repo
  2. The git tag for this submission
  3. The name of the package you created
  4. The roslaunch command that starts your solution
  5. The graph generated by your code (screenshot is ok)

Rubric

4 points: Submission details (tag, instructions, etc)
6 points: Single launch file to start everything, launcher script
20 points: Correct math/algorithm for odometry
10 points: Correct output graph