当前位置:网站首页>旭日3SDB,安装原版ros
旭日3SDB,安装原版ros
2022-06-27 11:02:00 【在道路上奔跑】
0、准备资料
硬件:SDB的开发板解相关附件(板卡、电源线、sd卡)
硬件:显示相关(屏、屏幕连接线和屏电源)
硬件:鼠标、键盘、网线、电脑、读卡器(如果电脑直接能读取sd卡则不需要)
软件可以参考下面1章节中的链接的网盘资料。(链接:https://pan.baidu.com/share/init?surl=e8UISrjka2rqns21uv7tQg 提取码:mfz5)
软件:emmc镜像:地平线的产品中心的资源中心的旭日X3 SDB资料X3SDB Ubuntu 系统镜像中存在emmc的镜像
软件:ubuntu系统镜像:地平线的产品中心的资源中心的旭日X3派资料:旭日X3派系统镜像(桌面版)
软件:升级工具hbupdateV1.3
软件:mobaxterm串口工具
软件:balenaEtcher镜像烧写工具
软件:ros中的rosdep包:链接:https://pan.baidu.com/s/1ff0bsxZqABpbyWv1JAZ76w 提取码:yyds
1、烧写emmc镜像和ubuntu镜像
参考链接:https://developer.horizon.ai/forumDetail/89018995415500818
1.1烧写emmc镜像
刚到的板卡,参考文章说有些情况不用刷,不管了,再刷一遍应该也没事。
根据上面的链接的4章节进行如下操作
对开发板进行供电,
使用串口进行链接开发板和电脑。
打开hbupdateV1.3升级工具,
安装参考文档中或者下面的图进行配置烧写。
(这里我使用了网线进行连接和开发板和电脑,修改了电脑的ip与开发板在同一个网段,与参考文章一样。但我感觉没啥用,因为最后还是通过串口进行烧写的镜像,如果出现问题,还得安装参考文档的一步一步来)
1.2烧写ubuntu系统镜像
依旧参看上面文章进行如下操作。或者参考x3派的手册1.2章节
拔下开发板的内存卡,其采用弹式卡槽,按一下就可以取出来了。树莓派4B却没有这样设计。
将sd卡放入读卡器中插入电脑(使电脑可以对sd卡进行读写)。
对sd卡进行格式化。
打开balenaEtcher工具,将ubuntu镜像烧写到sd卡中
烧写完成后将sd卡插入到板卡中。
连接好显示屏。
再用参考文档的工具mobaxterm进行查看板卡启动过程(参考x3派手册2.1章节)
进行板卡上电,显示屏就会出现ubuntu的桌面。(上电后稍微等一下,串口开机后还会打印东西。首次可能需要时间长一点)
2、安装ROS
2.1板卡进行上网
参考x3派的3.2章节无线网络配置,利用手机热点进行上网,利用其他wifi也可以。
nmcli device wifi rescan
nmcli device wifi list
nmcli device wifi connect 账号 password 密码
# nmcli device wifi connect AIOT password 12345678 请换成自己的WI-FI热点账号密码
之后就可以上网了,可以使用下面语句进行测试
ping www.baidu.com
2.2安装ros-xxx-desktop-full
2.2.1参考文档
- ROS-虚拟机Ubuntu中安装ros系统:https://blog.csdn.net/weixin_41332204/article/details/120978312
- 古月居的安装含义:https://www.guyuehome.com/34072
2.2.2修改系统的源
通过查看系统的源文件,其使用的是国内的清华的源,所以不用更改。
2.2.3添加ros的源和秘钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
2.2.4安装ros系统
必须联网,首先更新一下源,更新系统。执行下面命令。更新中间需要同意是否继续,输入y按回车
sudo apt update && sudo apt-get upgrade
安装ros-noetic-desktop-full
sudo apt install ros-noetic-desktop-full
2.2.5ros的配置
执行 rosdep init和update指令,但其这两条语句需要链接github,其网站在国外,linux上总是连接失败。需要采用其他的方法进行跳过这两部。
rosdep init指令需要安装python-rosdep。但查找资料发现其中没有python-rosdep的源,无法使用apt的指令进行安装。参考官网:http://wiki.ros.org/rosdep
使用pip指令安装
sudo pip install -U rosdep
其中rosdep init和update的本质参考的文档
其中上文是修改的rosdep的引用文件,这几个文件都是在外网上的,其上文主要是将需要的文档进行下载,在修改其中的文档链接本地文档。
上面方法有一点不同,他们的路径是在/usr/lib/python2.7/dist-packages/rosdep2/,而此文章是在arm上安装的,使用的pip指令,所以路径应该是Usr/local/lib/python2.7/dist-packages/rosdep2/。按照上面的文档依次进行对应修改。切忌认真,不可进行弄错。
引用其中的段落:
链接:https://pan.baidu.com/s/1ff0bsxZqABpbyWv1JAZ76w
提取码:yyds
rosdep init:
本质上是从ssr中下载了一个包含几个链接的文档,并保存在特定路径下。因为长城或者别的缘故,很容易下载失败。
解决方法
将我提供的资源中的 _20-default.list_ 文件copy到 _/etc/ros/rosdep/sources.list.d/_路径下,如无路径,需要逐级创建。
新手教学,高手跳过
解压后的压缩包中右键打开终端,命令
sudo cp ./20-default.list /etc/ros/rosdep/sources.list.d
rosdep update
这一步本质上是从20-default.list文件中的几个链接里面下载文件,并进行相关的配置。同样由于长城的缘故,容易下载失败。
解决方法
将我提供的资源中的 _rosdistro-master/_文件夹 copy到_/etc/ros/rosdep/sources.list.d/_路径下
(sudo cp -r ./rosdistro-master/ /etc/ros/rosdep/sources.list.d)
然后分别修改以下三个文件
第一个文件
sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py
将其中的资源路径改为离线路径
DEFAULT_SOURCES_LIST_URL = 'file:/etc/ros/rosdep/sources.list.d/20-default.list'
第二个文件同理
sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py
REP3_TARGETS_URL = 'file:/etc/ros/rosdep/sources.list.d/rosdistro-master/releases/targets.yaml'
第三个文件依然同理
sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py
DEFAULT_INDEX_URL = 'file:/etc/ros/rosdep/sources.list.d/rosdistro-master/index-v4.yaml'
最后在最开始的终端
rosdep update
2.2.6ROS的环境配置
将ros的环境路径添加到全局环境中,其中的noetic为ros的版本号,
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc && source ~/.bashrc
ROS的环境配置,使得你每次打开一个新的终端,ROS的环境变量都能够自动配置好,也就是添加到bash会话中,因为命令 source /opt/ros/kinetic/setup.bash 只在当前终端有作用,即具有单一时效性,要想每次新开一个终端都不用重新配置环境,就用echo语句将命令添加到bash会话中。
2.2.7ros的其他依赖
在非arm上是可以执行下面语句的
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
但其中 python-rosinstall python-rosinstall-generator python-wstool是不能使用apt安装的
同理使用pip进行安装
sudo pip install rosinstall
sudo pip install rosinstall-generator
sudo pip install wstool
弹出已经安装的话就不用管了。
最后的build-essential使用下面语句安装
sudo apt install build-essential
2.2.7ros基础例子小海龟
分别打开终端执行下面语句
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
将鼠标点一下turtle_teleop_key的重点,之后就可以使用上下左右控制小海龟了。
边栏推荐
- 【TcaplusDB知识库】TcaplusDB机型管理介绍
- [tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
- 【TcaplusDB知识库】TcaplusDB OMS业务人员权限介绍
- [tcapulusdb knowledge base] tcapulusdb machine initialization and launch introduction
- 【TcaplusDB知识库】TcaplusDB单据受理-事务执行介绍
- Precautions for use of IO interface interrupt of Jerry [chapter]
- Leetcode 522 longest special sequence ii[enumeration double pointer] leetcode path of heroding
- 杰理之DAC输出方式设置【篇】
- 飞桨产业级开源模型库:加速企业AI任务开发与应用
- 杰理之睡眠以后定时唤醒系统继续跑不复位【篇】
猜你喜欢

Quelles sont les fonctions de base nécessaires au développement d'applications de commerce électronique en direct? Quelles sont les perspectives d'avenir?

QStyle类用法总结(三)
![[tcapulusdb knowledge base] Introduction to tcapulusdb general documents](/img/04/b1194ca3340b23a4fb2091d1b2a44d.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb general documents

L'utilisation de C language 0 length Array

Open source model library of flying propeller industry: accelerating the development and application of enterprise AI tasks

QStyle实现自绘界面项目实战(一)

Matlab exercises - create 50 rows and 50 columns of all zero matrix, all 1 matrix, identity matrix, diagonal matrix, and output the 135 element of the matrix.

如何在 Methodot 中部署 JupyterLab?

Native JS implements page scroll bar loading data and page drop-down loading content
![[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (I)](/img/04/b1194ca3340b23a4fb2091d1b2a44d.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (I)
随机推荐
直播电子商务应用程序开发需要什么基本功能?未来发展前景如何?
[tcapulusdb knowledge base] tcapulusdb Model Management Introduction
Experiment notes - Convert Carmen (.Log.Clf) file to rosbag
[tcapulusdb knowledge base] Introduction to tcapulusdb analytical text export
[tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
Go zero micro Service Practice Series (VII. How to optimize such a high demand)
Red envelope rain: a wonderful encounter between redis and Lua
[tcaplusdb knowledge base] Introduction to tcaplusdb tcaplusadmin tool
Metadata of database
21: Chapter 3: develop pass service: 4: further improve [send SMS, interface]; (in [send SMS, interface], call Alibaba cloud SMS service and redis service; a design idea: basecontroller;)
【TcaplusDB知识库】TcaplusDB机型管理介绍
杰理之一直喂狗会频繁开关中断导致定时器【篇】
杰理之无缝循环播放【篇】
杰理之DAC输出方式设置【篇】
C語言0長度數組的妙用
“互联网+”大赛命题火热对接中 | 一图读懂百度38道命题
Leetcode 177 The nth highest salary (June 26, 2022)
【TcaplusDB知识库】Tmonitor单机安装指引介绍(一)
[tcapulusdb knowledge base] Introduction to tcapulusdb table data caching
从零开始搭建物联网系统