-
Notifications
You must be signed in to change notification settings - Fork 0
Week 4: Velocity Controller
lasithaya edited this page Apr 8, 2020
·
7 revisions
The final part of our lane controller code is to navigate the robot inside the two lanes line. We will use the heading angle w.r.t to lanes to steer the robot to the center of the two lanes. If the heading is positive we will move the robot to the right and vise versa if the heading is negative. This can become quite tricky to fine-tune as there are some parameters that need to adjust according to your lane environment and the robot. It also depends on the frame rate of the received camera images and their latency.
To execute velocity commands, we need to subscribe to the /cmd_vel topic of the robot and send out forward velocity and angular velocities as shown in the below code
from geometry_msgs.msg import Twist
vel_pub=rospy.Publisher('/cmd_vel', Twist, queue_size=1)We will be using a proportional controller