This repo holds the first problem statement of event and its arena. The Arena is in the form of an OpenAI gym and runs on python libraries like Pybullet
and OpenCV
.
You can learn its installation from here
We recommend you to go through the pybullet and OpenCV installation video before moving forward to setup the project.
git clone https://github.com/Robotics-Club-IIT-BHU/LaRoboLiga_PS1Arena.git
cd LaRoboLiga_PS1Arena/gym-line-follower-env/
pip install -e .
There is also a description.py file, running which will introduce you to the env functions, arguments they need and their return types.
The goal of this round is to make the robot car follow the line given in the arena by controlling the motors of the robot car. The movement of the robot has to be entirely autonomous. If the car comes back to its initial position after completing one lap of the track, the objective of the PS will be achieved. You may refer to this workshop for insights into robot controls.
-
Run the solution.py file. If you see the bot moving with forward velocity, Voila! Your installation is complete.
-
In solution.py, you'll see a working loop. You'll have to write the code to control the robot within this working loop.
-
There are several functions in helper.py for you to navigate the arena. Their names and use cases are as follows:
husky.get_full_path()
This function will return an array of the path. Each element of this array will have the x and y coordinates of the path at the 0th and 1st index.husky.reset()
Once this function is run, the present arena will be replaced with another with a new random path and the husky initilized to one of the points in this path.husky.setvelocity([v, v])
Use this function to manipulate the velocity of the husky wheels. This function takes an array of two values. The value at 0th index will be the velocity of the front and rear left motors while the value at 1st indext will be the velocity of the front and rear right motors.husky.getposition()
This function will return the x & y coordinates and the yaw angle of the robot.
You may look into the file to explore the working of these function and to add or remove functions of your own.
Note: this Arena is only for reference. The track is randomized and changes every time husky.reset()
is run.
Ankur Agarwal | Pratik Mishra |