ROS2机器人实验报告提示01➡入梦⬅

2021-12-02 13:07:53 浏览数 (1)

有学生说清醒的时候是不会选择学ROS的,太痛苦了,那索性把入门改称“入梦”吧。

*注意-提供镜像使用galactic版本,实验报告为foxy,需自行修改哦!

这一节,所需内容都已经在课程镜像中提供了,嵌入式单片机支持ESP32系列。

简单试一试ros2吧,以下操作最好在网络畅通情况下运行。

  • rosdep初始化:sudo rosdep init
  • rosdep更新:rosdep update
  • 系统源更新:sudo apt update
  • 系统更新:sudo apt upgrade
  • 安装桌面版galactic:sudo apt install ros-galactic-desktop

当然,镜像中已经安装好了,重复试一试吧?看看显示什么?

正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 ros-galactic-desktop 已经是最新版 (0.9.3-2focal.20210901.031506)。

看一看.bashrc?能否找到如下代码行

  • source /opt/ros/galactic/setup.bash

使用#注释后,新开启终端,试一试有何改变?

  • ros2

开启终端:ctrl alt t,新开标签tab:ctrl shift t,在终端结束进程:crtl c 。

未配置:

ros2:未找到命令

配置:

usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ... ros2 is an extensible command-line tool for ROS 2. optional arguments: -h, --help show this help message and exit Commands: action Various action related sub-commands bag Various rosbag related sub-commands component Various component related sub-commands daemon Various daemon related sub-commands doctor Check ROS setup and other potential issues interface Show information about ROS interfaces launch Run a launch file lifecycle Various lifecycle related sub-commands multicast Various multicast related sub-commands node Various node related sub-commands param Various param related sub-commands pkg Various package related sub-commands run Run a package specific executable security Various security related sub-commands service Various service related sub-commands topic Various topic related sub-commands wtf Use `wtf` as alias to `doctor` Call `ros2 <command> -h` for more detailed usage.

加一下思考题部分:

局域网ROS2之间通讯实验,例如摄像头,远距离遥控小乌龟等。

自行思考并补充即可。

0 人点赞