栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

在进行树莓派网络配置、安装dronekit、安装ros时我遇到的一些问题

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在进行树莓派网络配置、安装dronekit、安装ros时我遇到的一些问题

写得很乱,慎看!

永久改写USB口读写权限的方法
1.运行命令:
lsusb –vvv

2.树莓派网络获取和桌面安装
通过网线连接树莓派和电脑,随后电脑开启无线连接,共享网络,这样树莓派就有网了,然后开启PC端Ubuntu18.04按照商家给的教程连接树莓派,然后换源,更新源,在PC端输入命令安装桌面。

更新源可能会ubuntu报错 :Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

解决:sudo vim /etc/resolv.conf
添加nameserver 8.8.8.8
然后sudo apt-get update

3.安装dronekit
安装dronekit要在树莓派的命令行输入命令安装,反正我的在PC端输入安装不了,树莓派有时输入一次安装也不行,一次不行就多重复几次

强制删除文件不提示:
sudo rm –rf 文件名
删除文件提示:
sudo rm –r 文件名

教程Git部分:
运行git clone https://github .com/ArduPilot/ardupilot提示
fatal:Needed a single revision
Unable to find current revision in submodule path ‘filename’
解决:
git rm --cached ‘filename’
github官网下载解压复制到虚拟机Ubuntu。

将GitHub官网上开发人员应该克隆主ArduPilot存储库
打开终端并导航到您希望存储克隆的目录
克隆你的叉子:
git clone https://github.com/your-github-userid/ardupilot
cd ardupilot
git submodule update --init --recursive

听说在脚本默认使用wget下载,速度奇慢无比,解决方法:
安装了zip,rar压缩工具
在Windows系统下(Ubuntu没试过)事先在官网下载ARM交叉编译工具链gcc-arm-none-eabi-6-2017-q2-update-Linux(直接在官网查找选项输入就可以了),下载好压缩包,复制到Ubuntu桌面里解压到桌面,然后将它移到/opt目录参考 https://jingyan.baidu.com/article/db55b609318ea94ba20a2f71.html

安装各种依赖包:
先增加sh权限:
chmod +x /home/book/ardupilot/Tools/environment_install/install-prereqs-ubuntu.sh –y

直接运行Tools/scripts/install-prereqs-ubuntu.sh –y则会提示没有这个文件
所以运行/home/book/ardupilot/Tools/environment_install/install-prereqs-ubuntu.sh –y

配置路径:
cd ardupilot
Tools/environment_install/install-prereqs-ubuntu.sh-y
. ~/.profile

cd ardupilot
./waf --targets bin/docs/config/arducopter –upload

查看树莓派IP最好在树莓派终端查看,在手机上查看可能不准确(我连接我手机热点的)

Ubuntu查找文件命令:
sudo find / -name “name”

运行sudo rosdep init
出错则运行sudo vim /etc/hosts
加上151.101.84.133 raw.githubusercontent.com

roscore报错没有安装sudo apt install python-roslaunch
输入:echo “source /opt/ros/melodic/setup.bash” >> ~/.bashrc
source ~/.bashrc

运行rosrun turtlesim turtlesim_node提示package ‘turtlesim’ not found
则运行sudo apt-get install ros-$(rosversion -d)-turtlesim
再运行rosrun turtlesim turtlesim_node即可

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/869677.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号