Appendix
About
This section is included to assist the students to perform the activities in the book. It includes detailed steps that are to be performed by the students to achieve the objectives of the activities.
Chapter 1: Fundamentals of Robotics
Activity 1: Robot Positioning Using Odometry with Python
Solution
from math import pi
def wheel_distance(diameter, encoder, encoder_time, wheel, movement_time):
time = movement_time / encoder_time
wheel_encoder = wheel * time
wheel_distance = (wheel_encoder * diameter * pi) / encoder
return wheel_distance
from math import cos,sin
def final_position(initial_pos,wheel_axis,angle):
final_x=initial_pos[0]+(wheel_axis*cos(angle))
final_y=initial_pos[1]+(wheel_axis*sin(angle))
final_angle=initial_pos[2]+angle ...
Get Artificial Vision and Language Processing for Robotics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.