ros:base(自用)

目录

乱七八糟

问题1

问题2

问题3

问题4

问题5

问题6

问题7

问题8


乱七八糟

1. ctrl+h 显示Linux隐藏文件

2.vscode找以往命令:上下键

3.终端找:ctrl+p

4.vscode字体很小解决:

问题1

错误提示:RLException: Invalid roslaunch XML syntax: no element found: line 1, column 0
The traceback for the exception was written to the log file

解决方法:保存一下launch文件,ctrl+s

问题2

错误提示:

[ERROR] [1720943622.260979734, 370.436000000]: SpawnModel: Failure - model name mycar already exist.
[ERROR] [1720943622.275123, 370.451000]: Spawn service failed. Exiting.
[gazebo-1] process has died [pid 9371, exit code 255, cmd /opt/ros/noetic/lib/gazebo_ros/gzserver -e ode worlds/empty.world __name:=gazebo __log:=/home/cherry/.ros/log/fc594b64-41b3-11ef-8734-6b936b13e604/gazebo-1.log].
log file: /home/cherry/.ros/log/fc594b64-41b3-11ef-8734-6b936b13e604/gazebo-1*.log
[ INFO] [1720943622.649369305]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1720943622.668429660]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ WARN] [1720943622.668841759, 370.825000000]: Shutdown request received.
[ WARN] [1720943622.669897348, 370.825000000]: Reason given for shutdown: [[/gazebo_gui] Reason: new node registered with same name]
[model-3] process has died [pid 9381, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -urdf -model mycar -param robot_description __name:=model __log:=/home/cherry/.ros/log/fc594b64-41b3-11ef-8734-6b936b13e604/model-3.log].
log file: /home/cherry/.ros/log/fc594b64-41b3-11ef-8734-6b936b13e604/model-3*.log

解决方法1:虚拟机设置-显示器-关闭加速3D图形

解决方法2:之前打开过gazebo,关闭相关窗口,重新打开

参考资料:[gazebo_gui-3] process has died [pid 2413, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclie_[gazebo-3] process has died [pid 14765, exit code -CSDN博客

问题3

错误提示:RLException: [demo01_helloworld.launch] is neither a launch file in package [urdf_gazebo] nor is [urdf_gazebo] a launch file name
The traceback for the exception was written to the log file

解决方法:

三种解决思路

1.没有roscore 打开终端输入roscore

2.没有source ./devel/setup.bash

3.写错了路径(检查一下红色箭头)

问题4

错误提示:

[ERROR] [1720972109.871736, 257.461000]: Spawn service failed. Exiting. [ INFO] [1720972109.922601926, 257.462000000]: Physics dynamic reconfigure ready. [model-3] process has died [pid 12341, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -urdf -model mycar -param robot_description __name:=model __log:=/home/cherry/.ros/log/715984a8-41f8-11ef-a4e0-dff94756f7cf/model-3.log]. log file: /home/cherry/.ros/log/715984a8-41f8-11ef-a4e0-dff94756f7cf/model-3*.log

解决方法:gazebo打开太频繁

我的解决方法是关闭一会儿重新启动(感觉有点不靠谱,但成功运行了)

问题5

错误提示:

cherry@cherry17:~/navi$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py
[rospack] Error: package 'teleop_twist_keyboard' not found

sudo apt-get install ros-noetic-teleop-twist-keyboard

注意:【noetic】为版本 注意一下版本。

问题6

错误提示:

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
the rosdep view is empty: call ‘sudo rosdep init‘ and ‘rosdep update‘

参考资料:

the rosdep view is empty: call ‘sudo rosdep init‘ and ‘rosdep update‘_the rosdep view is empty: call 'sudo rosdep init' -CSDN博客

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

问题7

错误提示:

[rospack] Error: package 'pub_sub' not found

解决方法:

pub_sub是文件名

问题8

当ROS__INFO 终端输出有中文时,会出现乱码

INFO: ?????????????????????????????

解决办法:在函数开头加入下面代码的任意一句

setlocale(LC_CTYPE, "zh_CN.utf8");
setlocale(LC_ALL, "");

未完待续

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值