(self)
| 31 | self.xSLAM.append(odomL.pose.pose.position.x) |
| 32 | self.ySLAM.append(odomL.pose.pose.position.y) |
| 33 | def plot(self): |
| 34 | plt.title('Odometry comparison') |
| 35 | plt.plot(self.xWheel,self.yWheel,color='green', label='Wheel encoder') |
| 36 | plt.plot(self.xSLAM,self.ySLAM,color='red', label='SLAM odometry') |
| 37 | plt.legend() |
| 38 | plt.xlabel('X (m)') |
| 39 | plt.ylabel('Y (m)') |
| 40 | plt.show() |
| 41 | def start(self): |
| 42 | rospy.spin() |
| 43 | if __name__ == '__main__': |