Disclaimer: this video is only for demonstrational purposes. It does NOT show the actual path followed by the robot during our data acquisition.
THE ROBOT
Omnidirectional robot Mecanum wheels
– 4wheelswithrollersat45° Encoders on each wheel
– RPM(verynoisy)
– Ticks(moreaccurate) Geometric parameters:
– Wheelradius(𝑟)
– Wheelpositionalongx(±𝑙) – Wheelpositionalongy(±𝑤)
𝑟𝑟
𝑟 𝑟
THE PROJECT
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)
–
–
THE PROJECT
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 Compute wheel control speeds from v, ⍵
II.
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
- Write down the formula to compute v, ⍵ from wheel speeds *
- Adapt formula to use encoder ticks (more precise) instead of RPM
- Compute a rough estimate of v, ⍵ (with given robot parameters fixed)
4. Publishv,⍵astopiccmd_veloftypegeometry_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
- Write down the formula to compute v, ⍵ from wheel speeds
- Adapt formula to use encoder ticks (more precise) instead of RPM
- Compute a rough estimate of v, ⍵ (with given robot parameters fixed)
- Publishv,⍵astopiccmd_veloftypegeometry_msgs/TwistStamped
- – Compute odometry using v, ⍵
- Start with Euler, add Runge-Kutta later
- Add ROS parameter for initial pose (x,y,θ)
- Publish as nav_msgs/Odometry on topic odom
- BroadcastTFodom->base_link
- – Calibrate robot parameters (r, 𝑙, 𝑤, 𝑁) to match GT pose
II. COMPUTE CONTROL
– Compute wheel speeds (RPM) from v, ⍵
- Reverse the formula obtained at the previous step (I.1)
- Read v, ⍵ from cmd_vel and apply the obtained formula
3. Publish the computed wheel speed as custom message on topic wheels_rpm
– Thecustommessagehasprototype: Header header
float64 rpm_fl
float64 rpm_fr
float64 rpm_rr
float64 rpm_rl
f/r: front/rear l/r: left/right
Check that the results match the recorded encoders values, apart from some noise – Youcoulduserqt_plotorplotjuggler
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
DATA
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
DATA
Additional information:
– Wheelradius(𝑟):0.07m(couldbeabitoff)
– Wheelpositionalongx(𝑙):0.200m
– Wheelpositionalongy(𝑤):0.169m
– Gearratio(𝑇):5:1
– Encodersresolution(𝑁):42CPR(CountsPerRev.)(couldbeabitoff)
FILES
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 freestyleJ
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)
SUBMISSION
You should deliver your project via email, attaching 1 compressed file as follows:
- – Createa.tar.xzarchivecontaining:
– atextfilewithinstructions(detailsinnextslide)
– thesourcecodeforeverypackageyoucreated(entirepackagefolders,includingtheirCMakeLists, package.xml, etc.)
– PleaseDONOTsendusyourentirecatkinenvironment(withbuildanddevelfolders);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 properlyrecreate your workflow with what you send us
- – NamethearchivewiththeStudentID(“PersonCode”)ofeachteammember
– 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”
SUBMISSION
The instruction file must be a .txt or .md file and must contain (at least): – StudentID(“PersonCode”),nameandsurnameofallteammembers – smalldescriptionofthefilesinsidethearchive
– nameandmeaningoftheROSparameters
– structureoftheTFtree
– structureofanycustommessage
– descriptionofhowtostart/usethenodes – infoyouthinkareimportant/interesting
TEAMS AND DEADLINE
You can work in teams of max 3 students (unless previously discussed) Deadline: May 8 2022, 23:59 CEST (Rome time zone)
QUESTIONS
Questions:
– SendanemailtoPaoloCudrano([email protected])
– Cc:SimoneMentasti([email protected]) – DONOTwriteonlytoProf.Matteucci
CHALLENGE
ROBOTICS
FIELD ROBOT EVENT 2022
We would like to participate with a team of students to the International Field Robot Event 2022, June 14–16, 2022 https://www.fieldrobot.com/event/
Navigation and mapping in a maize field
– Virtualrobot
– Real robot ? (TBD)
CHALLENGE
HOW TO PARTICIPATE
Interested students should meet with us in order to discuss further details.
You can let us know your interest by sending an email to all of us with subject “Robotics – FRE 2022”.
We should receive these requests by April 8
(Not a strict deadline, but we need some time to get organized…)
Important: to avoid inconveniences in the future, we strongly suggest interested students to still prepare and submit Project 1.



