目录
-
- 问题1. 在使用xarco建立urdf时,运行joint_state_publisher/joint_state_publisher_gui报错
- 问题2. 使用amcl定位时报`No laser scan received`警告, /scan 话题有数据,amcl也订阅了该话题。
- 问题3. 运行.py文件报错
- 问题4. 在roalaunch一个launch文件时报 ModuleNotFoundError: No module named 'xxxxx'
- 问题5. vscode 终端字符间距过大
- 问题6. 首次在 ROS 中启动 Gazebo 时,出现 Err [REST.cc:205] Error in REST request 问题
- 设置默认使用python3
- 问题7. joint_state_publisher等文件字符集不兼容问题
问题1. 在使用xarco建立urdf时,运行joint_state_publisher/joint_state_publisher_gui报错
错误如下:
[joint_state_publisher_gui-4] process has died [pid 97153, exit code 1, cmd /opt/ros/melodic/lib/joint_state_publisher_gui/joint_state_publisher_gui __name:=joint_state_publisher_gui __log:=/home/ros/.ros/log/4422783c-0504-11ee-8b5a-000c29b0c758/joint_state_publisher_gui-4.log].
log file: /home/ros/.ros/log/4422783c-0504-11ee-8b5a-000c29b0c758/joint_state_publisher_gui-4*.log
原因:一般均因为urdf內部含有中文字符
解决方案:
- 将urdf文件内部中文字符全部刪除;
- 修改joint_state_publisher和 joint_state_publisher_gui 配置
- cd /opt/ros/melodic/lib/joint_state_publisher (joint_state_publisher_gui类似)
- sudo gedit joint_state_publisher
- 修改
- 在import sys後面加 reload(sys) sys.setdefaultencoding(“utf-8”)
- 若仍然報錯修改執行權限:
cd /opt/ros/melodic/lib/joint_state_publisher
chmod 777 joint_state_publisher
问题2. 使用amcl定位时报No laser scan received警告, /scan 话题有数据,amcl也订阅了该话题。
错误如下所示:
amcl: No laser scan received (and thus no pose updates have been published) for xxxx seconds ?




原因:没有里程计信息,导致amcl

文章列举了在使用ROS开发过程中遇到的几个典型问题,包括建立urdf模型时的编码错误,amcl定位缺少激光雷达数据,运行.py文件权限和编码问题,roslaunch模块找不到错误,VSCode终端字符间距过大,首次启动Gazebo的REST请求错误,以及joint_state_publisher的字符集不兼容问题,并提供了相应的解决方案。
最低0.47元/天 解锁文章
5767

被折叠的 条评论
为什么被折叠?



