2022 IB Diploma Extended Essays
The trajectory of the robot in relation to the x and y coordinates, implementing Zed fusion SLAM. Shows the pose (position and orientation) of the robot. The robot shows many errors when following the path towards it’s goal. There are many unnecessary movements which is particularly highlighted when the robot is following a straight line. The trajectory also highlights that there isn’t a smooth motion to the change in rotation the robot makes. The steeper gradients within the yaw(t) highlight the rotations the robot makes in order to make the robot turn within the environment. However the smaller gradients within the yaw(t) normalized graph shows the correction in terms of rotation the robot makes in order to correct itself to follow the path. These gradients are shorter in terms of time, however they occur more frequently, which explains why the trajectory is ragged. The changes in the x coordinates in relation to time presents the robot making changes within the x plane. The peaks of the graphs are the robot making turns, while the smaller changes represent the robot correcting itself. The same is true for the changes in y coordinates in relation to time. It is also to be noted that Zedfu creates a 3D reconstruction of the scene. This adds a layer of complexity to the problem, as the lighting conditions and complex geometry make a big difference to the problem of navigation. This leads to the robot to re-correct it’s path more frequently. However this could also be presented as the robot completes the path with a higher velocity, making the robot complete it’s path quicker.
Code for benchmarks Pose calculation #!/usr/bin/env python
import rospy import math import rospkg
from sensor_msgs.msg import Imu from tf.transformations import euler_from_quaternion from geometry_msgs.msg import PoseWithCovarianceStamped rad2degrees = 180.0/math.pi yaw_offset = 0 #used to align animation upon key press
# get an instance of RosPack with the default search paths rospack = rospkg.RosPack()
# get the file path for sensor_fusion rospack.get_path('sensor_fusion')
path=rospack.get_path('sensor_fusion')+'/dataTxt/laps/' pose_position = open(path+'pose_position.txt', 'w') pose_orientation = open(path+'pose_orientation.txt', 'w') pose_covariance = open(path+'pose_covariance.txt', 'w') def processPoseWithCovarianceStamped_message(dataMsg): global yaw_offset
Made with FlippingBook. PDF to flipbook with ease