Skip to content

CMP3103 Week 4

GPrathap edited this page Feb 5, 2024 · 1 revision

Besides the following tasks, make sure you have caught up with all the previous tasks.

IMPORTANT: You are expected to bring your source code from the previous workshop(s) to every workshop again. Also you are expected to take your own notes, e.g. about the commands you use, how things worked, etc, and have them available for every session. The workshops are successively building on top of each other. You need the knowledge from the previous workshops to engage in this one. It is strongly advised to store all your coding after every session. Best recommendation for this to use a source code repository, free to use from various providers, such as http://github.com or https://bitbucket.org/, for instance.

Task for this week:

In the lecture the robot kinematics (internal kinematics, external kinematics, direct kinematics, and inverse kinematics) for a robot with a differential drive (like the turtlebot) have been introduced.

Differential drive kinematics

You already know that your turtlebot accepts a geometry_msgs/Twist message on the topic /cmd_vel to receive motion commands. This Twist message defines the linear velocity and the angular velocity, which the turtlebot driver converts into angular velocities ω using the "inverse kinematics".

However, assume you want to command your robot using wheel angular velocity yourself, so, you want to define the angular velocities ω for each wheel. Then, you need to use the forward kinematics to find the values for a suitable Twist message from given ω values.

Let's try to control a differential drive robot. Consider you are given the following vehicle parameters: sampling period $T_s$ = 0.033s and wheel radius r = 0.04 m. For each specified case, determine the shape of the path traced by the robot using both analytical calculations and simulation. The current state of the robot you can get by calling self.robot_current_pose

  • v(t) = 0.5 m/s, $\omega(t)$ = 0 rad/s
  • v(t) = 1 m/s, $\omega(t)$ = 2 rad/s
  • v(t) = 0 m/s, $\omega(t)$ = 2 rad/s
  • wheels angular velocities are $\omega(t)_L= 20 rad/s$ and $\omega(t)_R= 18 rad/s$

Try

Clone this wiki locally