Skip to content

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

License

Notifications You must be signed in to change notification settings

syauqibilfaqih/Pioneer-Robot-Navigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages