Week 5 & 6 - minaamakary/MENA GitHub Wiki
The pcd file shows the room layout but has some noise around the room. This was resolved when clearing the cache. Also the same was with rviz where it was not recognizing the displays added to the config file.
The turtlebot3 slam runs but the launch file is not recognized in rviz. The turtlebot does not move around. Trying to debug the launch file to understand what might be the issue
Created turtlebot_automovement.py The rover only moves around for a couple of seconds before turning around. This script does not yet recognize walls.
The robot doesn’t move the way it should. Using twist command lines move.linear.z = 0.5 doesn’t rotate exactly 90 degrees. By debugging a bit, the issue appears to be because the robot has to stop completely between different movements. For instance, if the robot has to turn 90 degrees but is moving straight, it is advisable to stop the robot completely first before giving the next movement command to the robot and vice versa.
Decided to create a function just for turning 90 degrees. the function would be called whenever there is a wall less then 0.75 meters, to make the rotation.
The readings we are trying to get from the LiDAR Scanner (PointCloud2) are 3D and 360 degrees. These can be very effective for mapping but for navigation, they are creating limitations with the movement of the robot as it is not handling that data to be suitable for navigation. Instead we are going to use, laser scanner /scan topic which is in 2D to figure out the wall distances for navigation purposes and keep the LiDAR data strictly for mapping the room at a later stage. To implement this, we modified the laser scan sensor in the turtlebot3 xacro file
<scan> <horizontal> <samples>180</samples> <!-- Adjusted for higher resolution --> <resolution>1</resolution> <min_angle>-1.570796</min_angle> <!-- -180 degrees --> <max_angle>1.570796</max_angle> <!-- 180 degrees --> </horizontal> </scan>
We have modified this file changing the angles to -1.57 to 1.57 which corresponds to -180 to 180 degrees to be able to make sense of the data coming from each direction.