Time to update to ROS Melodic Ubuntu 18.04
Research on Navigation
Being a Computer Science student, and an aspiring engineer; I really like coding and reading about different Algorithms and Data Structures. It was really great when I came to know about this particular algorithm called VFF/Virtual Force Field (Yeah, you won’t find it on Wikipedia) from José Sir. It is a really cool Robotics Navigation Algorithm that allows a robot to navigate an obstacle based path. Too brief! Let’s go on to some details:
Algorithms are everywhere! Be it arranging marriages or scheduling your busy day. So, why leave Robotics? Now the domain of Robotics has algorithms pertaining to vision, naviagation and localisation and many more. The task for this week was to understand a navigation algorithm called Virtual Force Field(VFF).
As I mentioned above, there are no simple links relating to the topic, so I jumped right towards the research paper! It’s on my personal drive, as I started maintaining one for Papers. It’s a really cool algorithm, that allows an autonomous robot to navigate through a path consisting of obstacles. It does so by assigning our waypoint and the obstacle a vector. The obstacle behaves as a repulsive vector and the waypoint acts as an attracting vector. Summing both these vectors gives a resultant which our robot can follow. Simple enough let’s move to something tougher. This algorithm cannot allow the robot to go through tight passages. Even if it enters one, there is a lot of unstable motion.
So, the researchers J. Borenstein and Y. Koren came up with an improved version of the algorithm called Virtual Field Histogram(VFH). Yes, it’s available on wikipedia. Here is the research paper(My aim is to create a collection of these research papers on my drive #NerdGoals). It improves over the previous algorithm, by maintaining a histogram of sensor readings and following the direction in which there is a less threshold value, in short; a valley in the sensor readings.
But the next problem I am going to solve involves VFF. So, that’s what I have to code!
Problems Ahead!
Let’s launch the launch file! And here we are with a problem, we have a folder named obstacle_avoidance, but it contains the launch file to a turtlebot based exercise. Hence of no use! Now, as I can see, there is no launch file related to the problem I need to solve, but the launch file is present in the jderobot-gazebo-assets. So let’s launch it from there. To implement the code, JDERobot provides us with an interface, which is executed in python. My next guess; let’s run the interface of the turtlebot exercise of obstacle avoidance. We have the next problem! jderobot
module not found.
After some searching and trying some tweaks on Adarsh’s (he asked for a special mention) Ubuntu 18.04, I found that the problem was with Ubuntu 16.04, which I was using. Some of the program files for jderobot module refuse to download on 16.04 due to dependency issues. Hence, it was high time I switched to Ubuntu 18.04.
ROS Melodic here I come!
SpoilerAlert: Lots of errors and loads of Google searches ahead.
My best bet was to update the existing Ubuntu version. Simple, just follow random instructions given on a link generated by Google, until you encounter an error and try to fix it. The error was due to some broken packages present on my system. After a lot of brainstorming, and reading a lot about Package Managers and differences between dpkg and apt ROS Kinetic was deleted and then the system was updated. A simple solution, but took a lot of time to strike.
What else can go wrong, when the update has completed and we finally have the Ubuntu 18.04 login screen? Nothing, just a login page loop! Again a lot of intersting searches about gdm and lightdm which finally led to the solution. Just activate the terminal at login page, login with your account and type the command lightdm
. A great temporary solution, will make it permanent soon!
A simple installation of ROS Melodic, and then sudo apt install jderobot
, we have our jderobot module ready to be used! This problem has also been referred in this issue.
Next Week
Running the previously mentioned python file doesn’t work. The interface mentioned in the website problem is quite different. So, maybe I was all wrong while finding the problem, or have to do some tweaks again, but that’s all for next week!