赞
踩
Jetson Nano - Ubuntu 18.04 + ROS2 Eloquent
Rplidar A2
// 新建工作空间 source ~/.bashrc mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src // 克隆rplidar_ros2项目 git clone https://github.com/CreedyNZ/rplidar_ros2.git cd .. // 编译 source /opt/ros/eloquent/setup.sh colcon build --symlink-install // 配置工作空间 sudo gedit ~/.bashrc source ~/ros2_ws/install/setup.bash // 查看rplidar串行接口 ls -l /dev |grep ttyUSB // 开启权限 ttyUSB0 是串口名 sudo chmod 666 /dev/ttyUSB0
如果报错:bash: colcon: 未找到命令,安装:
sudo apt update && sudo apt install -y \ build-essential \ cmake \ git \ python3-colcon-common-extensions \ python3-pip \ python-rosdep \ python3-vcstool \ wget # install some pip packages needed for testing sudo -H python3 -m pip install -U \ argcomplete \ flake8 \ flake8-blind-except \ flake8-builtins \ flake8-class-newline \ flake8-comprehensions \ flake8-deprecated \ flake8-docstrings \ flake8-import-order \ flake8-quotes \ pytest-repeat \ pytest-rerunfailures # [Ubuntu 16.04] install extra packages not available or recent enough on Xenial python3 -m pip install -U \ pytest \ pytest-cov \ pytest-runner \ setuptools # install Fast-RTPS dependencies sudo apt install --no-install-recommends -y \ libasio-dev \ libtinyxml2-dev
第一个终端
source ./install/setup.bash
ros2 run rplidar_ros rplidarNode
第二个终端
source ./install/setup.bash
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 world laser_frame
第三个终端
source ./install/setup.bash
rviz2 ./install/rplidar_ros/share/rplidar_ros/rviz/rplidar.rviz
运行 Rplidar 节点并使用测试应用程序查看
source ./install/setup.bash
ros2 run rplidar_ros rplidarNodeClient
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。