Description
EECE 5554 Robotics Sensing and Navigation
Lab learning objectives and tasks:
In this lab, you are going to build a navigation stack using two different sensors – GPS and IMU
and understand their relative strengths and drawbacks.
Please get an early start to the lab. You cannot complete this lab in a day!
Data acquisition can be done collectively as a team. One dataset per team is sufficient.
Hardware / Sensors
GNSS puck – usb based, issued one per team. (use the one issued for Lab 1)
Vectornav VN-100 IMU – usb based, issued one per team. The user manual for the
sensor has already been provided for Lab3.
Data collection Policy
Plan data collection schedules amongst your teammates. You can talk to your teammates and
ask questions on Piazza.
Part A: Collect Data in a car for dead-reckoning as a Team
Setup
Collect Data from both the GPS and IMU sensors. Make sure you are able to see both gps
msgs and imu msgs on your machine.
Mount the IMU in your vehicle with electrical tape. Make sure that the x –axis is pointed forward
and that the imu is as close to horizontal as possible. Fix the GPS puck to the roof – it has a
magnetic back and should just stay there. Connect both sensors to your laptop and begin
logging. Wait 10 seconds and start the vehicle. Drive course including 360 turns for compass
calibration. After finishing the mission, shut down logging.
Ideally in the beginning of your ride, go around in a circle 3-4 times for compass calibration. One
suggested place to do would be roundabout in front of Ruggles station and Ryder hall. Then go
for a ride and come back to the starting point. (like a loop).
Logistics (Recommended) If you / one of your teammates has access to a car, it might be more
convenient for data collection. So that you can do it on your team schedule.
Alternatively, a team can schedule to use our autonomous car ‘NUANCE’ for data collection.
Ask the TAs about the availability of the NUANCE car and NEU driver requirements
EECE 5554 Robotics Sensing and Navigation Spring 2022
B: Analysis on the data collected in Part A (Individually)
1. Estimate the heading (yaw)
Magnetometer Calibration:
Correct magnetometer readings for “hard-iron” and “soft-iron” effects using the data collected
when going around in circles.
Submit plots showing the magnetometer data before and after the correction in your report.
Calculate the yaw angle from the corrected magnetometer readings.
Integrate the yaw rate sensor to get yaw angle. One way to do this is to use ‘trapz’ or ‘cumtrapz’
commands in Matlab and treat your time series as a function that is being integrated.
Compare the yaw angle from above two methods.(Magnetometer vs. Yaw Integrated from
Gyro).
Use a complementary filter to combine the measurements from the magnetometer and yaw rate
as described in class to get an improved estimate of yaw angle (filter the magnetometer
estimate using a low pass filter and gyro estimate using a high pass filter). You might also find
the ‘unwrap’ or ‘wraptopi’ commands in matlab useful.
Compare your result to the yaw angle computed by the IMU and write down your observations.
2. Estimate the forward velocity
Integrate the forward acceleration to estimate the forward velocity.
Additionally, calculate an estimate of the velocity from your GPS measurements.
Plot both the velocity estimates.
Make observations on the plot. Does the integrated velocity estimate make sense?
Make adjustments to the acceleration measurements to make the velocity plot more reasonable.
Provide the rationale you use for the adjustments and plot the adjusted velocity.
3. Dead Reckoning with IMU
Integrate IMU data to obtain displacement and compare with GPS.
We simplify the description of the motion by assuming that the vehicle is moving in a twodimensional plane. Denote the position of the center-of-mass (CM) of the vehicle by (X,Y,0)
and its rotation rate about the CM by (0,0,ω). We denote the position of the inertial sensor in
space by (x,y,0) and its position in the vehicle frame by (xc,0,0). Then the acceleration
measured by the inertial sensor (i.e. its acceleration as sensed in the vehicle frame) is
x¨ obs=X¨ −ωY˙ −ω
2
xc
y¨ obs=Y¨ +ω X˙ +ω˙ xc
EECE 5554 Robotics Sensing and Navigation Spring 2022
where all of the quantities in these equations are evaluated in the vehicle
frame.
1. Assume that Y˙ =0 (that is, the vehicle is not skidding sideways) and
ignore the offset by setting xc=0. Then the first equation above reduces
toX¨ =x¨ obs. Integrate this to obtain X˙ . Compute ω X˙ and compare it to y¨ obs
. How well do they agree? If there is a difference, what is it due to?
2. Use the heading from the magnetometer to rotate
x¨ =v˙ +ω×v=X¨ +ω˙ ×r+ω×X˙ +ω×(ω×r)
into a fixed (East, North) reference frame. Denote this vector by (ve,vn).
Integrate it to estimate the trajectory of the vehicle (xe,xn). Compare the
estimated trajectory with the GPS track by plotting them on the same
plot. Make sure to adjust starting point, so that both the tracks start at
the same point and same heading (adjust heading so that the first straight
line from both are oriented in the same direction).
Report any scaling factor used for comparing the tracks.
3. Estimate xc.
NOTE: Denote the position and velocity of the center-of-mass (CM) of the vehicle by R and V,
respectively. The inertial sensor is displaced from the CM by r = (xc,0,0) – note that this vector is
constant in the vehicle frame. Let ω = (0,0,ω) denote the rotation rate of the vehicle about the
CM. The velocity of the inertial sensor is v = V + ω x r, and its corresponding acceleration is:
x¨ =v˙ +ω×v=X¨ +ω˙ ×r+ω×X˙ +ω×(ω×r)
Taking the x- and y-components of this equation in the vehicle frame gives the two equations
quoted above.
How to Submit Lab_4
1. In your class repo ‘EECE5554_RoboticsSensing’, create a directory called LAB4
2. Copy the ros driver package used for this assignment under LAB4.
3. Inside LAB4, create sub-directory ‘analysis’
4. Copy the matlab/python code used for data analysis and dead reckoning under ‘analysis’
5. Place your report in pdf format also in analysis directory.
Your repo structure should look similar to
‘
‘
‘
6. Push your local commits to (remote) gitlab server. You can verify this by visiting
gitlab.com and making sure you can see the commit there.