Starting from:

$30

Robotics-omni-robot Solved

Omnidirectional robot

 Mecanum wheels

-                 4 wheels with rollers at 45°

Encoders on each wheel

-                 RPM (very noisy)

-                 Ticks (more accurate) Geometric parameters:

-                 Wheel radius (𝑟)

-                 Wheel position along x (±𝑙)

-                 Wheel position along y (±𝑤)

 

Given

-                 Wheels encoder state

-                 RPM (noisy)

-                 Ticks (more accurate)

-                 Nominal robot parameters: 𝑟, 𝑙, 𝑤, encoder CPR 𝑁, gear ratio 𝑇

-                 Ground truth (GT) pose of the robot (acquired with  OptiTrack)

 

Goals

I.               Compute odometry using appropriate kinematics

-    Compute robot linear and angular velocities v, ⍵ from wheel encoders

-    Compute odometry using both Euler and Runge-Kutta integration

-    ROS parameter for initial pose

-    Calibrate (fine-tune) robot parameters to match ground truth II. Compute wheel control speeds from v, ⍵

III.        Add a service to reset the odometry to a specified pose (x,y,θ)

IV.       Use dynamic reconfigure to select between integration method

I. COMPUTE ODOMETRY                                                                                         
-       Compute velocities with mecanum wheels kinematics

1.             Write down the formula to compute v, ⍵ from wheel speeds *

2.             Adapt formula to use encoder ticks (more precise) instead of RPM

3.             Compute a rough estimate of v, ⍵ (with given robot parameters fixed) 4. Publish v, ⍵ as topic cmd_vel of type geometry_msgs/TwistStamped

 * Do some reading on mecanum wheels.

In particular, you can use 

"Modern robotics: Mechanics, Planning, and 

Control" by Kevin M. Lynch and Frank C. Park Free version here

I. COMPUTE ODOMETRY                                                                                         
-                   Compute velocities with mecanum wheels kinematics

1.             Write down the formula to compute v, ⍵ from wheel speeds

2.             Adapt formula to use encoder ticks (more precise) instead of RPM

3.             Compute a rough estimate of v, ⍵ (with given robot parameters fixed)

4.             Publish v, ⍵ as topic cmd_vel of type geometry_msgs/TwistStamped

-                   Compute odometry using v, ⍵

1.             Start with Euler, add Runge-Kutta later

2.             Add ROS parameter for initial pose (x,y,θ)

3.             Publish as nav_msgs/Odometry on topic odom

4.             Broadcast TF odom->base_link

-                   Calibrate robot parameters (r, 𝑙, 𝑤, 𝑁) to match GT pose

II. COMPUTE CONTROL                                                                                           
-                   Compute wheel speeds (RPM) from v, ⍵

1.             Reverse the formula obtained at the previous step (I.1)

2.             Read v, ⍵ from cmd_vel and apply the obtained formula

3.             Publish the computed wheel speed as custom message on topic wheels_rpm

-                    The custom message has prototype: Header header float64 rpm_fl float64 rpm_fr float64 rpm_rr float64 rpm_rl

Check that the results match the recorded encoders values, apart from some noise

-                   You could use rqt_plot or plotjuggler

III. RESET SERVICE                                                                                                     
-                   Define a service to reset the odometry to any given pose (x,y,θ)


IV. INTEGRATION METHOD SELECTOR                                                                
-                   Use dynamic reconfigure to select the odometry integration method

-                   Use an enum with 2 values: Euler, RK


 

3 ROS bags, with topics:

-                  Encoder message containing RPM and ticks for the 4 wheels

-                  Topic /wheel_states of type sensor_msgs/JointState

-                  Ground truth pose of the robot (acquired with OptiTrack)

-                  Topic /robot/pose of type geometry_msgs/PoseStamped

 

Additional information:

-                  Wheel radius (𝑟): 0.07 m (could be a bit off)

-                  Wheel position along x (𝑙): 0.200 m - Wheel position along y (𝑤): 0.169 m

-                  Gear ratio (𝑇): 5:1

-                  Encoders resolution (𝑁): 42 CPR (Counts Per Rev.) (could be a bit off)

 

Everything you need (bags, these slides) is in our shared folder (link on the course website) 


TIPS FOR DEBUG                                                                                                       
You can use rviz to visualize the given ground truth pose and your odom and TF.

To do so, you might want to define a static TF transform to align the frame odom (yours) and world (used by OptiTrack).

For the robot calibration, notice that:

-                  bag 1 only performs linear motions (no rotations)

-                  bag 2 only performs forward motions and in-place rotations (no y translation)

-                  bag 3 is freestyle J

ADDITIONAL INFO                                                                                                     
The ground truth pose is measured with an Optitrack system, which is based on cameras. For this reason, this information might sporadically not be available due to occlusion, or it might present some lag. This should not affect your project, just be aware of it.


GENERAL REQUIREMENTS                                                                                      
The project must be written in C++

-                  NO Python unless previously discussed You can use any number of nodes.

You must provide 1 single launch file to start everything needed except the bag (i.e., all nodes, parameters, etc.).

Remember that we should be able to run your code on our machines

-                  E.g., DO NOT use absolute paths

-                  Test with Ubuntu 18.04 + ROS Melodic

-                  (If possible, test on a colleague’s machine)

 

You should deliver your project via email, attaching 1 compressed file as follows:

-                  Create a .tar.xz archive containing:

-                  a text file with instructions (details in next slide)

-                  the source code for every package you created (entire package folders, including their CMakeLists, package.xml, etc.)

-                  Please DO NOT send us your entire catkin environment (with build and devel folders); we only need the packages you created inside of your src folder

-                  Notice: include all the files you think are important, as we should be able to properly recreate your workflow with what you send us

-                  Name the archive with the Student ID ("Person Code") of each team member

-                  E.g. 10450001-10450002-10450003.tar.xz

-                  Send this archive (only once per team) via e-mail to all of us: Paolo Cudrano, Simone Mentasti and Matteo Matteucci. Email subject must be “FIRST ROBOTICS PROJECT 2022”

 

The instruction file must be a .txt or .md file and must contain (at least):

-                  Student ID ("Person Code"), name and surname of all team members

-                  small description of the files inside the archive

-                  name and meaning of the ROS parameters

-                  structure of the TF tree

-                  structure of any custom message

-                  description of how to start/use the nodes

-                  info you think are important/interesting

More products