Documentation repository for the EduBot ROS2 compatibility project
PRIZM ROS2 package: prizm_ros2
PRIZM Arduino microcode for prizm_ros2: prizm_ros2_arduino
EduBot LDS-01 LiDAR ROS2 Driver: hls_lfcd_lds_driver
ROS2 Webcam Publisher: usb_cam
EduBot ROS2 Examples: prizm_ros2_examples
Clone the following repositories into a ROS2 workspace:
prizm_ros2
git clone https://github.com/LTU-Actor/prizm_ros2.gitprizm_ros2_arduino
git clone https://github.com/LTU-Actor/prizm_ros2_arduino.githls_lfcd_lds_driver
git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git -b jazzyusb_cam
sudo apt install ros-jazzy-usb-camprizm_ros2_examples
git clone https://github.com/LTU-Actor/prizm_ros2_examples.gitBuild the EduBot ROS2 packages with the following lines:
colcon build --packages-select prizm_ros2 hls_lfcd_lds_driver prizm_ros2_examplessource <ros2 workspace>/install/setup.bashIn order to do serial communication, your user needs to be in the dialout group.
sudo adduser $USER dialout
You may need to reboot after adding your user to a new group.
NOTE: If your PRIZM controller already has the prizm_ros2_arduino microcode installed, you may skip this step.
Navigate to the prizm_ros2_arduino repository and follow the instructions there to set up the PRIZM Arduino with the prizm_ros2_arduino microcode.
Power on the Tetrix PRIZM controller and connect your machine by USB.
Launch the program with the following line:
ros2 launch prizm_ros2 launch.py serial_port:=<device path to PRIZM>The serial_port parameter defaults to /dev/ttyUSB0, but can be modified.
Shortly after launching prizm_ros2, the green LED should show on the PRIZM controller. Press the green button to enable the controller.
You may now use prizm_ros2 to control the bot's movement and LEDs. See the prizm_ros2 ROS2 Info for a full description of the ROS2 usage structure.
Connect the LiDAR to your machine by USB. The LiDAR should spin upon connecting.
Launch the program with the following line:
ros2 launch hls_lfcd_lds_driver hlds_laser.launch.pyLiDAR ranging information should appear on the /scan topic.
Visualization of the LiDAR ranging information can be done with the following line:
rviz2 -d <driver directory>/rviz/hlds_laser.rvizSome basic examples are available:
Drives the bot at a constant speed and yaw for a specified duration.
ros2 run prizm_ros2_examples drive_forward_yaw