My friend Siddharth had thought of an idea to use a laser and a webcam to mimic a 2D LIDAR and had registered for IBM Day a while back. The date for the presentation was 24th September, two days after our mid-semester exams. He asked me for demonstrating the project with him and to help with the conversion of laser range data to a point cloud format compatible with ROS (robot operating system). The project seemed interesting and easily doable within 2 days, so I agreed. But the time-frame wasn’t quite as planned. The thing to note here is that both of us are lazy creatures with nothing but impending deadlines getting us off our backs. Not surprisingly, nothing was done on the 22nd.
Siddharth already had the 3D printed mount for the laser and webcam ready. We had access to Technology Robotix Society’s (robotics club at IIT Kharagpur) newly acquired 3D printer due to Siddharth’s on-again-off-again relationship. On the evening of the 23rd when we realized we should indeed be doing something we went to the market and bought the necessary accessories – screws, tape etc., and set to work. The previous day, we had discussed the data format to be transmitted from the Rasberry PI – a NumPy array of distances at various angles. I had written the code to read this and convert into a Point Cloud format in ROS – exactly the same as those transmitted by LIDARS used with ROS today. Therefore, the output of our system could directly be used by other ROS nodes such as localization, mapping, path planning etc.
After an all-nighter which included changing the entire image processing code and integrated the point cloud conversion into the pipeline, the hardware was ready. Now all that needed to be done was to obtain the parameters of the camera (radians per pixel) by applying linear regression to the data obtained from the camera – pixel offset vs actual distance of the object. Surprisingly, the data was fairly linear. With that done, we set about to actual testing (23rd September, 4:30 a.m.). The device worked better than both our expectations and that too in the first try!
IBM Day: The guest lectures by IBM researchers and the professors from our institute were disappointing, portraying no zeal for their research. I hate to admit, but they swayed my mind away from ever going into research momentarily. Ours was the only undergraduate team in the competition, and there was a humongous difference between the amounts of efforts put in by us and the other teams (an all-nighter compared to months). However, the demonstration went quite well, and the judges were impressed by what we were trying to achieve and the very low cost of our product.
Though we were not able to come in the top three (others had put in a lot more effort than us), it was a good time spent to make the makeshift LIDAR and the (free) food was brilliant.
(A picture of me with the device, Siddharth is notoriously reluctant to get clicked)