install imu tools from CCNY Robotics Lab to use filters.
sudo apt-get install ros-<YOUR_ROSDISTRO>-imu-tools
- Go to your workspace and clone the repo.
git clone [email protected]:gyiptgyipt/gyro_micro_ros.git
- build the project.
colcon build --symlink-install
- Go to src/firmware and upload the code.
If you are using ArduinoIDE go to Arduino Code directory and just upload the code.(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
-Run time_bridge and imu_filter (time_bridge.cpp in nothing, It just sync time with ros2 system because I am not familiar with "rclc" micro_ros_arduino library's time stamp.) -And don't forget to set value of use_magnetometer: false in imu_tools package's configuration because Mpu6050 don't have magnetometer.
ros2 run gyro_micro_ros time_bridge
after subscribing and republishing imu data,we add filter.
ros2 launch imu_filter_madgwick imu_filter.launch.py
youtube video link : YOUTUBE
-Mapping using Ultrasonic Sensor (sonic_to_laser)