
With all individual components set up, it's time to integrate them and perform comprehensive testing to ensure everything works harmoniously.
7.1. Launch All Nodes
To streamline the process, consider using separate terminals for each node or utilizing a launch file that includes all necessary nodes. Here's how to proceed using separate terminals:
Terminal 1: Launch roscore (if not already running)
roscore
Terminal 2: Launch RPLIDAR Node
roslaunch rplidar_ros rplidar_a1.launch
Terminal 3: Launch IMU Node
roslaunch mpu6050_driver mpu6050.launch
Terminal 4: Launch TF Broadcaster(Not necessary, already included in mpu.launch.. if you can't understand, review the last post)
roslaunch mpu6050_driver tf_broadcaster.launch
Terminal 5: Launch Motor Control Node
roslaunch motor_control motor_control.launch
Terminal 6: Launch Obstacle Avoidance Node
roslaunch motor_control obstacle_avoidance.launch
Terminal 7: Launch RViz
rviz
Configure RViz:
* Fixed Frame: Set to laser.
- Add Displays:
Map (/map)
RobotModel (/robot_description)
LaserScan (/scan)
IMU (/imu/data_raw)
TF
7.2. Testing the Integrated System
Verify LIDAR and IMU Data in RViz:
Test Motor Control:
2.1. Manual Commands:
2.2. Obstacle Avoidance:
Monitor ROS Logs:
rosrun rqt_console rqt_console
rosrun rqt_graph rqt_graph

similar above diagram...(maybe)
These tools help visualize node connections and monitor logs for any errors or warnings.