Skip to content

SDP-Group-1/nav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB Libaries

MATLAB and Webots on DICE

You are not able to run these together on Dice due to the fact that you have to ssh into lab to use MATLAB and webots is on another path. You may try to do this but I encountered many errors related to MATLAB not being on the same path as webots. I tried adding to the path using PATH=$PATH but it still didn't work.

Instead, download webots and matlab on your personal computer or in a virtual machine.

A guide on how to set up MATLAB and Webots can be found at here. To get familiar with webots and MATLAB if you haven't already, I suggest to follow along this 10 min guide.

Robot

Chosen robot: TurtleBot3Burger.

Import the robot into your world and it comes along with a LDS-01 lidar sensor.

For an example of the robot set-up, look at the basic-example folder within the webots folder in this repository.

Basic Robot Movement

To move the robot, you must create a controller. For a very basic example of a controller, look at the controller within the basic-example within the webots folder in this repository.

Essentially, we create a loop and at every time-step, we update the velocity of the left and right wheel motor. If we want the turtlebot to move left, we can increase the velocity of the right wheel motor.

For more detail on velocity control, see here.

Lidar Readings

Just like for basic movement, the lidar must be controlled within a controller. For a basic example, please see the lidar-readings webots project located within the webots folder.

At every time stop, we read the lidar readings. The lidar readings are represented as a an array of points corresponding to the distance to the object being measured at that angle.

For more detail about the lidar, see here.