Thursday, February 16, 2023

Current state of the robot

 So currently the robot can be teleoperated via keyboard and scan the room using the lidar. I also connected the IMU and 4 ultrasound sensors. 

Driving the robot around is really fun, but because the wheels are all controlled individually it doesn't go straight. Surprisingly the strafing mode works a lot better than just driving forward. 

I did some digging online and found out that one way to solve this problem is to control the linear and angular velocities individually. 

Below is a graph of what I currently have as a setup on the robot and what I want to have.


At first I didn't want to do this, because I didn't want the kinematics calculations to be on the Arduino. I'm going to have to find a linear algebra library or figure something else out. 

One thing that's kinf of weird is that Twist commands are in Float 64 format, but that doesn't work with ros-serial. It automatically converts it to Float 32 and a loss of precision occurs. 

One thing I'm really excited for is to implement an Extended Kalman filter. I learnt about it in school during my Bachelor's degree and it seems like an advanced concept with a lot of cool applications.

LIDAR experiements

  

 Working on the lidar I discovered that you first need to create the build directory before you cd into it.

$ git clone https://github.com/YDLIDAR/YDLidar-SDK.git
$ cd YDLidar-SDK/build

$ cmake ..

$ make

$ sudo make install

 

lidar is -60mm in the x dimension. 0 in the y. 1/2 height of robot in the z.


It can be launched with 

roslaunch ydlidar_ros_driver X4.launch

roslaunch ydlidar_ros_driver lidar_view.launch

Then you can view the results in rviz.

The next step is for me to establish the transforms from the lidar to the center of the robot. I can do that by defining a static tf broadcast or by specifying that in the URDF (
Unified Robotics Description Format) file. Then I can make the visualization better.




NEW Project Autonomous underwater vehicle!

  I have been more and more interested in Autonomous Underwater Vehicles and ocean exploration. I live on the coast with direct access to th...