Docsity

Autonomous Robotics - Assignment 5 | CS 685, Assignments of Computer Science

Toggle sidebar
bg1
CS685 - Homework 5, due Oct 28th, Jana Koˇseck´a
1. Consider now a differential drive model of the mobile robot which with a configuration space
[x, y, θ]T. Suppose that we can control linear and angular velocity of the robot vand ω.The
differential equation of describing the motion of the mobile rob ot is as follows:
˙x=vcos(θ)
˙y=vsin(θ)
˙
θ=ω
Given an initial configuration of the robot [x0,y
0,θ
0]Tandthedesiredposition[xd,y
d]T
develop a simulation in Matlab which implements following a feedback control law based 1.
Compute at each instance of time the desired velocity xd=[˙xd,˙yd]Twhich will be proportional
to the distance from the goal. 2. Compute at each instance the desired vand ω, by pro jecting
the current velocity vector v, (which is in the direction of robot’s heading) to the direction
of desired velocity xand making the linear velocity proportional to the angle between the
current heading and the desired heading, i.e.
v=kp(˙xdcos θ+˙ydsinθ)(1)
ω=kθ(atan2( ˙yd,˙xd)−θ)(2)
Hand in the Matlab code and plot the of the trajectories. For example pick 20 positions at
random in the interval [-100, 100] and make the point [0, 0] to be the desired goal.
2. Consider a robot with configuration q=[x,y ]Tmoving in the environment with static obsta-
cles represented as circles. The attractive potential functions is defined as:
Uatt(q)= 1
2kattρ(q, qgoal)2and Uatt(q)=katt ρ(q, qgoal)
where ρ(q, qgoal) is a Euclidean distance between qand qgoal. The potential function associated
with an obstacle qiis defined as:
Urepi=1
2krep(1
ρi(q)−1
δ)ifρi(q)≤δ
0ifρi(q)>δ
Implement the goal reaching behavior in the absence and presence of obstacles using potential
field method outlined in class.
•Derive analytical expressions of the gradients of the ab ove potential functions.
•Consider an environment with three obstacles at positions at [5,5], [7,8] and [6,2]. Write
a Matlab function which computes the vector field of this environment. Submit the plot
of the vector field.
•Suppose that initial configuration of the robot in the above scenario is [0,0] and that
you can control motion in xand ydirection, i.e. ˙q=[˙x, ˙y]Tthe trajectory of the robot
will satisfy following differential equation:
˙q=−∇U(q)
where ∇U(q)=∇Uatt(q)+Pi∇Urepi(q). Plot and submit the trajectory of the robot
from the initial to the final configuration and discuss the choice of constants katt and
krep used.
pf2

Partial preview of the text

Download Autonomous Robotics - Assignment 5 | CS 685 and more Assignments Computer Science in PDF only on Docsity!

CS685 - Homework 5, due Oct 28th, Jana Koˇseck´a

  1. Consider now a differential drive model of the mobile robot which with a configuration space [x, y, θ]T^. Suppose that we can control linear and angular velocity of the robot v and ω. The differential equation of describing the motion of the mobile robot is as follows:

x˙ = v cos(θ) y˙ = v sin(θ) θ˙ = ω

Given an initial configuration of the robot [x 0 , y 0 , θ 0 ]T^ and the desired position [xd, yd]T develop a simulation in Matlab which implements following a feedback control law based 1. Compute at each instance of time the desired velocity xd = [ ˙xd, y˙d]T^ which will be proportional to the distance from the goal. 2. Compute at each instance the desired v and ω, by projecting the current velocity vector v, (which is in the direction of robot’s heading) to the direction of desired velocity x and making the linear velocity proportional to the angle between the current heading and the desired heading, i.e.

v = kp( ˙xd cos θ + ˙yd sin θ) (1) ω = kθ(atan2( ˙yd, x˙d) − θ) (2)

Hand in the Matlab code and plot the of the trajectories. For example pick 20 positions at random in the interval [-100, 100] and make the point [0, 0] to be the desired goal.

  1. Consider a robot with configuration q = [x, y]T^ moving in the environment with static obsta- cles represented as circles. The attractive potential functions is defined as:

Uatt(q) =

kattρ(q, qgoal)^2 and Uatt(q) = kattρ(q, qgoal)

where ρ(q, qgoal) is a Euclidean distance between q and qgoal. The potential function associated with an obstacle qi is defined as:

Urepi =

2 krep(^

1 ρi(q) −^

1 δ )^ if^ ρi(q)^ ≤^ δ 0 if ρi(q) > δ

Implement the goal reaching behavior in the absence and presence of obstacles using potential field method outlined in class.

  • Derive analytical expressions of the gradients of the above potential functions.
  • Consider an environment with three obstacles at positions at [5, 5], [7, 8] and [6, 2]. Write a Matlab function which computes the vector field of this environment. Submit the plot of the vector field.
  • Suppose that initial configuration of the robot in the above scenario is [0, 0] and that you can control motion in x and y direction, i.e. q˙ = [ ˙x, y˙]T^ the trajectory of the robot will satisfy following differential equation:

q˙ = −∇U (q)

where ∇U (q) = ∇Uatt(q) +

i ∇Urepi (q). Plot and submit the trajectory of the robot from the initial to the final configuration and discuss the choice of constants katt and krep used.

  • Construct a scenario when the robot will get trapped in a local minimum and suggest a way how to avoid it. Matlab function quiver can be used for plotting the vector fields.