This is the tutorial for understanding the use of ultrasonic waves and laser. We also observe their characteristics and properties.
-use of slam -use of point cloud -understanding angle increment of those two sensors -micro_ros_arduino -using IMU as rotation using IMU_tools ( IMU drift over time)
- Gyro_micro_ros tutorial
- slam-tool-box
-
sudo apt-get install ros-<your-ROS-DISTRO>-slam-tool-box
-
Go to your workspace
-
Download the repository
-
git clone https://github.com/gyiptgyipt/sonic_to_laser.git
-
Build the project
-
colcon build --symlink-install
-
source install/setup.bash
-
Upload the micro_ros program to your microchip.(don't forget to change the SSID,PASSOWRD AND TARGET IP)
make sure that installing micro_ros_arduino library.
library link : micro_ros_arduino
If it not installed, micro_ros.org and follow the tutorial.
-In that link you can use to upload firmware with that packages but there is a little probem with my machine, so I used above methods. And build and source declear that project in your ros2 workspace.
-I just use the micro_ros_agent from that tutorial.(Because we uploaded our firmware with arduino IDE)
In this project, I use wifi udp4 to get the data from micro_controller.
If it already installed, run micro ros agent
ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888
And than you will see the node and topic in host computer(that use targeted IP address)
- And Run
-
ros2 run sonic_to_laser sonic_to_laser
- after that /laser topic formed from /sonic (Changed sonic data to laser data )
ros2 launch sonic2laser_map online_async_launch_mapping.launch.py
-Open rviz2.
rviz2
-Set the global frame to map
and
-Start vizualize your map.
-<If you want to save map, use map saver and map server packages>
Future plan - make odometry smooth and get low noises map. But because of the angle increment of sonic wave is 30 degrees, it should be only work in small area environment.