Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.73 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.73 KB

Pioneer-Robot-Navigation

A straight-forward code to navigate a differential drive mobile robot to a goal position in CoppeliaSim

image

This system was developed based on a course titled "Control of Mobile Robots" by Dr. Magnus Egerstedt from Georgia Institute of Technology. Instead of using Matlab Simulink, the model was implemented on Pioneer 3-DX mobile robotic platform simulation on CoppeliaSim Edu.

image

The code is simply navigating the robot by the following model

image

        posPioneer=sim.getObjectPosition(pioneer,-1)
        oriPioneer=sim.getObjectOrientation(pioneer,-1)
        posTarget=sim.getObjectPosition(targetDummy,-1)
        
        desiredTheta = math.atan2(posTarget[2]-posPioneer[2],posTarget[1]-posPioneer[1])
        
        omega = (desiredTheta - oriPioneer[3])
        vX = v0*math.cos(omega)
        vY = v0*math.sin(omega)
        print(posTarget[1]-posPioneer[1])
        omega = omega*(1.2) --Change the value inside the parentheses to get a better K gain
        vLeft=vX+vY-omega
        vRight=vX+vY+omega

Here is the example demo video:

Watch the video

Reference : Egerstedt, M. (). Control of Mobile Robots Module 2 Mobile Robots [PowerPoint slides]. School of Electrical and Computer Engineering, Georgia Institute of Technology. www.coursera.org