Skip to main content
留学咨询

辅导案例-ME 145

By May 15, 2020No Comments

ME 145 Robotic Planning and Kinematics Rev 10/25/2017 Page 1 of 2 Lab Session No. 3 Line Following for Differential-Drive and Unicycle Robots Instructions Submit your code through iLearn. Your code and reports are due on Wednesday, November 8th, 6:00 pm. Late submissions will not be accepted. Create a different Simulink file or script for each task below. You may copy/paste the necessary blocks if necessary. Programming Project: Unicycle and Differential-Drive Dynamics (150 points). 1) (10 points) Develop a Simulink model for a unicycle robot. Model inputs: forward velocity of the robot (V) and turning speed (Omega); initial position (X0, Y0) and orientation of the robot (Theta0). Model output: current position (X, Y) and orientation of the robot (Theta) after integrating the unicycle dynamics with the inputs above. 2) (10 points) Develop a Simulink model for a differential-drive robot. Model inputs: angular velocity of left and right wheels (Vl and Vr); distance between left and right wheel (L); radius of the wheel (R); initial position (X0, Y0) and orientation of the robot (Theta0). Model output: current position (X, Y) and orientation of the robot (Theta) after integrating the differential- drive dynamics with the input above. 3) (10 points) Test the above models. Select V = 1 and Omega = sin(100*t), where t is the time index. Compute the equivalent inputs for the differential-drive robot (use R = 0.1 and L = 0.5). Plot (use the Simulink block “Scope”) the position and orientation of the two robots, and verify that they are the same. 4) (10 points) Develop a Simulink model for a robot with linearized unicycle dynamics. The linearization must be around a straight-line trajectory in the horizontal (x) direction with constant velocity v. Model inputs: linearization velocity (v); deviations of the forward velocity of the robot (Deltav) and turning speed (DeltaOmega); initial position (X0, Y0) and orientation of the robot (Theta0). Model output: current position (X, Y) and orientation of the robot (Theta) after integrating the unicycle dynamics with the inputs above. 5) (10 points) Compare the unicycle robot with its linearized model. Select V = 1 and Omega = sin(0.01*t). Plot (use the Simulink block “Scope”) the position and orientation of the two robots. 6) (20 points) Implement a control law based on the linearized unicycle dynamics to force the differential drive robot to follow a straight line along the x direction with velocity equal to 2 m/s. Notice: your controller will give you V and Omega as control inputs, which must be converted to Vl and Vr for the differential drive robot. Test your controller: select X0 = -1, Y0 = 1 and Theta0 = pi/4. Compare the trajectories of the differential drive and linearized robots. 7) (20 points) Implement a control law based on the linearized unicycle dynamics to force the differential drive robot to follow a straight line written as y = tan(Alfa)x + b with velocity equal to 2 m/s. Calculate the tracking ME145 Robotic Planning and Kinematics Lab No. 2 Rev 10/25/2017 Page 2 of 2 error through “Error = −x*sin(Alfa) + y*cos(Alfa) – b*cos(Alfa)” and “delta_theta = Theta – Alfa”. Error is the difference between the robot’s current position and the line and delta_theta is the error between the current angle and target angle(Alfa). Notice: your controller will give you V and Omega as control inputs, which must be converted to Vl and Vr for the differential drive robot. Test your controller: select X0 = -1, Y0 = 1 and Theta0 = pi/4 for various values of Alfa. Compare the trajectories of the differential drive and linearized robots. 8) (20 points) Implement a control law based on the linearized unicycle dynamics to force the differential drive robot to follow a sinusoidal trajectory around the x direction with velocity equal to 2 m/s. Notice: your controller will give you V and Omega as control inputs, which must be converted to Vl and Vr for the differential drive robot. Test your controller: select X0 = -1, Y0 = 1 and Theta0 = pi/4. Compare the trajectories of the differential drive and linearized robots. 9) (20 points) Implement a control law based on the linearized unicycle dynamics to force the differential drive robot to follow a circle trajectory of radius 5 m centered at the origin with velocity equal to 2 m/s. Notice: your controller will give you V and Omega as control inputs, which must be converted to Vl and Vr for the differential drive robot. Test your controller: select X0 = -1, Y0 = 1 and Theta0 = pi/4. Compare the trajectories of the differential drive and linearized robots. 10) (20 points) Write three scripts to implement the previous controllers on the e-puck robot. The robot will have to perform trajectory tracking for a line, a sinusoidal, and a circle trajectory. Check the e-puck guide on iLearn for the programming and setup of e-puck. LineTrajectoryTracking Implement the controller in question (7) with X0=0, Y0=0, Angle0=pi/4, and tracking speed V=0.001, tracking a line with input angle Alfa SinusoidalTrajectoryTracking Implement the controller in question (8) with X0=0, Y0=0, Angle0=pi/4, and tracking speed V=0.001, tracking a horizontal sinusoidal trajectory. CircleTrajectoryTracking Implement the controller in question (9) with X0=0, Y0=0.1, Angle0=pi/4, and tracking angular speed Omega=0.001

admin

Author admin

More posts by admin