Robot Hardware Components and Programming: Unterschied zwischen den Versionen

Aus HSHL Mechatronik
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Zeile 16: Zeile 16:
  > sudo apt install ros-foxy-rplidar-ros <
  > sudo apt install ros-foxy-rplidar-ros <


Therefore, we must run the driver next. Currently, for the version that is installed on the apt repo, the package name is rplidar ros, and the node name is rplidar_composition.
Therefore, we must run the driver next. Currently, for the version that is installed on the apt repo, the package name is rplidar ros, and the node name is rplidar_composition. Several further optional settings must also be set. <br>
Several further optional settings must also be set.
 
* -p serial_port:=/dev/ttyUSB0 - The serial port the lidar
* -p frame_id:=lidar_link - The transform frame of the lidar
* -p angle_compensate:=true - Simply turn this setting on, please. If you don't turn it on, even though it appears to be on, it won't function properly.

Version vom 6. Januar 2023, 14:43 Uhr

The AplphBot is modified with a RPLidar is used for this project. Raspberry pi 4 is used as a computer with Odometer sensor and motor driver L298P is used.

IMG AlphaBot

Raspberry Pi 4 is installed with Linux server and established a SSH connection with the robot.

Please go through the documentation here for the steps: How to install Ubuntu Server on your Raspberry Pi

Then ROS2 is installed in raspberry pi through SSH

RPLidar Intrgration and Programming

Now that we have the driver software, we can post a LaserScan topic and communicate with the laser. Actually, there are a few distinct versions of the driver available. We are utilizing the package repository version in this instance. To install the package,

> sudo apt install ros-foxy-rplidar-ros <

Therefore, we must run the driver next. Currently, for the version that is installed on the apt repo, the package name is rplidar ros, and the node name is rplidar_composition. Several further optional settings must also be set.

  • -p serial_port:=/dev/ttyUSB0 - The serial port the lidar
  • -p frame_id:=lidar_link - The transform frame of the lidar
  • -p angle_compensate:=true - Simply turn this setting on, please. If you don't turn it on, even though it appears to be on, it won't function properly.