Persistence and PIDs: Our Journey in Drone Design
Persistence and PIDs: Our Journey in Drone Design
Hello there, my name is Toshan Luktuke, I’m a Second Year student at VJTI, Mumbai. This is the first year I’m applying for GSoC. After looking through a wide variety of organisations, I chose JDE Robot. I wanted to do something related to robotics for the summer and JDE perfectly captured my interests of robotics and engaging teaching.
I started by heading over to the offical website of JDE, there they had an entire page dedicated to GSOC. I looked through the projects and selected the two that seemed the most interesting to me:
The next step was to contact the mentors, but wait! We had to complete some challenges first. These served as asort of litmus test to show your interest and dedication to the project.
There were two compulsory and two optional challenges, I decided to do all of them.
There were two challeneges for C++ and Python. The C++ challenge was quite interesting. It involved tracing the longest path possible through a labyrinth composed of #’s with .’s as the path. My initial thought was to use some sort of reverse heuristic approach to get the longest path. However, I quickly abandonded that idea as we had to always find the longest path and heuristic apporaches are not guaranteed to find this path everytime.
I settled on a recursive backtracking approach and it worked like a charm. Another challenge was using CMAKE's
build system, it took a bit of trial and error to get everything working properly.
For the Python Challenge, we had to simulate the movement of a particle. I did this using matplotlib
and its animate class.
Since I had prior experience with how particles work due to previous projects, this one was quite simple.
The next challenge involved solving one exercise from JDE’s Robot Academy. Here we had to install the Docker container that contains these exercises. I followed their official instructions for the same. I faced some issues with enabling hardware acceleration. However despite trying many different alternatives, I couldn’t use my Nvidia GPU with the Docker Image at the end. Still, it wasn’t a huge issue as the simulation was running smoothly even without the dedicated GPU.
I decided to take up the PID Racecar Exercise.The simulation worked quite well despite the lack of hardware acceleration.
After playing around with JDE’s HAL
and GUI
classes, some revision of Colour Filters in CV2 and a lot of PID tuning later:
I installed ROS2 Foxy from the official site.
Following which I followed their tutorial for setting up a simple publisher and subscriber.
The last task here was to run a robot and visualize its laser scan data using rviz
. To do this I chose the dummy_robot
that is included with your ROS2 install.
I followed this tutorial for getting the dummy_robot up and running. After that it was a simple matter of adding a LaserScan element to rviz
and viola:
I followed this guide for the install of the turtlebot pre-requisites. It worked pretty well except for a memorable error.
In the current ROS2 install, the sourcing is done via the downloaded repo
. ~/ros2_foxy/install/local_setup.bash
However while following the install guide I had installed some packages in the local directory, so I had to do
source /opt/ros/foxy/setup.bash
Since I hadn’t done this before there were a few errors with CMAKE_SOURCE_DIR
while installing the required nav2
packages. However after the above command was run, it worked like a charm.
I did some reverse engineering using the RQT
tool in ROS2 to figure out which topic messages were being sent to, to get the turtlebot to move. My search led me to the /goal_pose
topic. From then it was a simple matter of writing a Python script to publish PoseStamped()
messages to the topic, and watch the bot move via script.
Repository link: https://github.com/toshan-luktuke/JDE_Challenges
Persistence and PIDs: Our Journey in Drone Design
Hello there, my name is Toshan Luktuke, I’m a Second Year student at VJTI, Mumbai. This is the first year I’m applying for GSoC. After looking through a wide...