ubuntu常见报错&&解决方法(二)

一、rqt_bag错误

sun@sun-Z370P-D3:~$ rqt_bag

QLayout: Attempting to add QLayout "" to TopicSelection "", which already has a layout

Traceback (most recent call last):

File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/timeline_frame.py", line 293, in paint

self._draw_topic_dividers(painter)

File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/timeline_frame.py", line 520, in _draw_topic_dividers

(x, y, w, h) = self._history_bounds[topic]

KeyError: '/tp_img'

原因:

将time_synch1功能包放在了src下,而没有放在ros_rslidar-master下面,具体原因未知。

二、编译错误

1、CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):

Could not find a package configuration file provided by "manipulation_msgs" with any of the following names:

manipulation_msgsConfig.cmake

manipulation_msgs-config.cmake

Add the installation prefix of "manipulation_msgs" to CMAKE_PREFIX_PATH or set "manipulation_msgs_DIR" to a directory containing one of the above files. If "manipulation_msgs" provides a separate development package or SDK, be sure it has been installed.

Call Stack (most recent call first):

ros_exploring/robot_marm/marm_planning/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!

See also "/home/sun/roshchx_ws/build/CMakeFiles/CMakeOutput.log".

See also "/home/sun/roshchx_ws/build/CMakeFiles/CMakeError.log".

Invoking "cmake" failed

解决方法:

sudo apt install ros-kinetic-manipulation-msgs

(sudo apt-get install ros-kinetic-ecto)

总之缺啥补啥

tips:

未安装必要的库和插件(prereq.sh脚本能帮我们安装一些常用的ROS工具包,包括navigation和mapping工具包等,在Terminal中直接运行如下代码即可:sudo ./prereq.sh)

2CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake:68 (message):

catkin_install_python() called with non-existing file

'/home/sun/aubo_ws/src/AUBO_robot/aubo_planner/script/aubo_planner/aubo_ros_plan'.

Call Stack (most recent call first):

AUBO_robot/aubo_planner/CMakeLists.txt:77 (catkin_install_python)

-- Configuring incomplete, errors occurred!

See also "/home/sun/aubo_ws/build/CMakeFiles/CMakeOutput.log".

See also "/home/sun/aubo_ws/build/CMakeFiles/CMakeError.log".

Makefile:318: recipe for target 'cmake_check_build_system' failed

make: *** [cmake_check_build_system] Error 1

Invoking "make cmake_check_build_system" failed

解决方法:

AUBO_robot/aubo_planner/CMakeLists.txt:77 (catkin_install_python)后面的文件位置不正确。

三、运行.sh文件

ubuntu下命令行输入 sudo ./xxx.sh后,找不到命令

解决办法:
右击xxx.sh文件,打开属性———>权限——>勾选允许作为程序执行文件,退出即可。

四、无法定位软件包

sudo apt install ros-kinetic-moveit_visual_tools

正在读取软件包列表... 完成

正在分析软件包的依赖关系树

正在读取状态信息... 完成

E: 无法定位软件包 ros-kinetic-moveit_visual_tools

原因:

软件包名错误。

解决方法:

sudo apt install ros-kinetic-moveit-visual-tools

五、 Anaconda导致的“Makefile:138: recipe for target 'all' failed”问题

解决方法:

home下的.bashrc里的Anaconda路径设置注释掉即可:

$ export PATH="/usr/local/anaconda3/bin:$PATH"

六、没有source

在运行roslaunch时出现了类似下面的错误:

RLException: [mav_hovering_example.launch] is neither a launch file in package [rotors_gazebo] nor is [rotors_gazebo] a launch file name

The traceback for the exception was written to the log file

原因:

setup.bash文件没有进一步说明包的来源。

解决方法:

source /catkin_ws/devel/setup.bash

七、rviz常见错误

1[ERROR] [1614477813.589406]: Could not find the GUI, install the 'joint_state_publisher_gui' package

[joint_state_publisher-2] process has died [pid 14681, exit code 1, cmd /opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/sun/.ros/log/28a05d6e-7969-11eb-b00d-b42e9916f18d/joint_state_publisher-2.log].

log file: /home/sun/.ros/log/28a05d6e-7969-11eb-b00d-b42e9916f18d/joint_state_publisher-2*.log

================================================================================REQUIRED process [rviz-4] has died!

process has finished cleanly

log file: /home/sun/.ros/log/28a05d6e-7969-11eb-b00d-b42e9916f18d/rviz-4*.log

Initiating shutdown!

==================================================================

原因:

缺少 joint_state_publisher_gui功能包

解决方法:

sudo apt-get install ros-kinetic-joint-state-publisher-gui

2ERROR: cannot launch node of type [arbotix_python/arbotix_driver]: arbotix_python

ROS path [0]=/opt/ros/kinetic/share/ros

ROS path [1]=/home/sun/roshchx_ws/src

ROS path [2]=/home/sun/ros_rslidar_ws/src

ROS path [3]=/home/sun/test_ws/src

ROS path [4]=/home/sun/catkin_ws/src

ROS path [5]=/opt/ros/kinetic/share

ERROR: cannot launch node of type [arbotix_controllers/gripper_controller]: arbotix_controllers

ROS path [0]=/opt/ros/kinetic/share/ros

ROS path [1]=/home/sun/roshchx_ws/src

ROS path [2]=/home/sun/ros_rslidar_ws/src

ROS path [3]=/home/sun/test_ws/src

ROS path [4]=/home/sun/catkin_ws/src

ROS path [5]=/opt/ros/kinetic/share

原因:

缺少ros-kinetic-arbotix 功能包

解决方法:

sudo apt-get install ros-kinetic-arbotix

3、运行命令“roslaunch marm_planning arm_planning.launch”时出现如下错误:

[ INFO] [1614517180.004391235]: Initializing OMPL interface using ROS parameters

[ERROR] [1614517180.007093808]: Could not find the planner configuration 'None' on the param server

[ERROR] [1614517180.016398790]: Could not find the planner configuration 'None' on the param server

[ INFO] [1614517180.029887540]: Using planning interface 'OMPL'

解决方法:

通过路径:home/sun/roshchx_ws/src/robot_marm/marm_moveit_config/config找到ompl_planning.yaml文件并用gedit打开,在该文件中找到default_planner_config,如下所示:

arm:

default_planner_config: None

gripper:

default_planner_config: None

None改为RRTConnect

4No sensor plugin specified for octomap updater 0; ignoring.

解决方法:

home/sun/aubo_ws/src/aubo_robot/aubo_i5_moveit_config/launch/aubo_i5_moveit_sensor_manager.launch.xml中添加sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater

并且在home/sun/aubo_ws/src/aubo_robot/aubo_i5_moveit_config/config/sensors_3d.yaml中去掉{},并添加如下内容。

- sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater

point_cloud_topic: /kinect/depth_registered/points

max_range: 5.0

frame_subsample: 1

point_subsample: 1

self_mask:

min_sensor_dist: .8

self_see_default_padding: .04

self_see_default_scale: 1.0

self_see_links:

- name: katana_internal_controlbox_link

- name: katana_base_link

- name: katana_motor1_pan_link

- name: katana_motor2_lift_link

padding: 0.06

- name: katana_motor3_lift_link

padding: 0.06

- name: katana_motor4_lift_link

padding: 0.06

- name: katana_motor5_wrist_roll_link

padding: 0.04

- name: katana_gripper_link

padding: 0.02

- name: katana_l_finger_link

padding: 0.02

- name: katana_r_finger_link

padding: 0.02

- name: kurtana_baseplate_link

- name: laser

- name: kurtana_pole_link

- name: kurtana_innerpole_stretch_link

八、运行python文件时无法运行

运行命令:rosrun marm_planning moveit_fk_demo.py

出错:

[rosrun] Couldn't find executable named moveit_fk_demo.py below /home/sun/roshchx_ws/src/robot_marm/marm_planning

[rosrun] Found the following, but they're either not files,

[rosrun] or not executable:

[rosrun] /home/sun/roshchx_ws/src/robot_marm/marm_planning/scripts/moveit_fk_demo.py

解决方法:

.py类型文件右键属性、权限、允许作为程序执行文件

九、RRTConnect: Motion planning start tree could not be initialized!或者 Could not find the planner configuration 'None' on the param server

解决方法:

在文件ompl_planning.yaml中,更换其他的default_planner_config.

十、Unable to identify any set of controllers that can actuate the specified joints: [ finger_joint1 ]

known controller and their joints

Apparently trajectory initialization failed.

解决方法:

将文件home/sun/roshchx_ws/src/robot_marm/marm_moveit_config/launch/arm_moveit_controller_manager.launch.xml中的“<rosparam file="$(find marm_moveit_config)/config/ros_controllers.yaml"/>”改为“<rosparam file="$(find marm_moveit_config)/config/controllers.yaml"/>”.

十一、[ERROR] [1614589847.051180573]: No default projection is set. Perhaps setup() needs to be called

[ERROR] [1614589847.051731966]: OMPL encountered an error: No projection evaluator specified

胡老师您好,想请教您一个问题。ros机器人开发实践中10.9.1节运行roslaunch marm_planning arm_planning.launchrosrun marm_planning moveit_fk_demo.py时,总是出现如下错误:

[ INFO] [1614589847.047628812]: Planning attempt 1 of at most 1

[ INFO] [1614589847.050491501]: Planner configuration 'gripper' will use planner 'geometric::SBL'. Additional configuration parameters will be set when the planner is constructed.

[ INFO] [1614589847.051059772]: SBL: Attempting to use default projection.

[ERROR] [1614589847.051180573]: No default projection is set. Perhaps setup() needs to be called

[ERROR] [1614589847.051731966]: OMPL encountered an error: No projection evaluator specified

[ INFO] [1614589848.147207436]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.

猜想是不是因为/home/sun/roshchx_ws/src/robot_marm/marm_moveit_config/config/ompl_planning.yaml中在

gripper:

default_planner_config: SBL

planner_configs:

- SBL

- EST

- LBKPIECE

- BKPIECE

- KPIECE

- RRT

- RRTConnect

- RRTstar

- TRRT

- PRM

- PRMstar

- FMT

- BFMT

- PDST

- STRIDE

- BiTRRT

- LBTRRT

- BiEST

- ProjEST

- LazyPRM

- LazyPRMstar

- SPARS

- SPARStwo后面缺少

projection_evaluator: joints(joint1,joint2)

longest_valid_segment_fraction: 0.005

可是 projection_evaluator: joints(joint1,joint2)中的joint1joint2应该写谁呀?

解决方法:

/home/sun/roshchx_ws/src/robot_marm/marm_moveit_config/config/ompl_planning.yaml文件改为:

arm:

default_planner_config: None

planner_configs:

- SBL

- EST

- LBKPIECE

- BKPIECE

- KPIECE

- RRT

- RRTConnect

- RRTstar

- TRRT

- PRM

- PRMstar

- FMT

- BFMT

- PDST

- STRIDE

- BiTRRT

- LBTRRT

- BiEST

- ProjEST

- LazyPRM

- LazyPRMstar

- SPARS

- SPARStwo

projection_evaluator: joints(joint1,joint2)

longest_valid_segment_fraction: 0.005

gripper:

planner_configs:

- SBL

- EST

- LBKPIECE

- BKPIECE

- KPIECE

- RRT

- RRTConnect

- RRTstar

- TRRT

- PRM

- PRMstar

- FMT

- BFMT

- PDST

- STRIDE

- BiTRRT

- LBTRRT

- BiEST

- ProjEST

- LazyPRM

- LazyPRMstar

- SPARS

- SPARStwo

可能会出现错误:

Could not find the planner configuration 'None' on the param server,但是无需理会,不影响最后的结果。

还可能会出现错误:

RRTConnect: Motion planning start tree could not be initialized!

这时只需要把home/sun/roshchx_ws/src/robot_marm/marm_planning/scripts/moveit_fk_demo.py文件中:

# 设置机械臂和夹爪的允许误差值

arm.set_goal_joint_tolerance(0.001)

gripper.set_goal_joint_tolerance(0.001)的误差值改大即可解决。即:

# 设置机械臂和夹爪的允许误差值

arm.set_goal_joint_tolerance(0.002)

gripper.set_goal_joint_tolerance(0.002)

十二、Gazebo中的机械臂仿真常见错误

1[ERROR] [1614611013.429619607, 0.161000000]: GazeboRosControlPlugin missing <legacyModeNS> while using DefaultRobotHWSim, defaults to true.

This setting assumes you have an old package with an old implementation of DefaultRobotHWSim, where the robotNamespace is disregarded and absolute paths are used instead.

If you do not want to fix this issue in an old package just set <legacyModeNS> to true.

解决方法

在文件home/sun/roshchx_ws/src/robot_marm/marm_description/urdf/arm.xacro中做如下改动:

22、[ERROR] [1614611013.539866998, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/joint1

[ERROR] [1614611013.540649050, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/joint2

[ERROR] [1614611013.541386382, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/joint3

[ERROR] [1614611013.542003347, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/joint4

[ERROR] [1614611013.542648932, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/joint5

[ERROR] [1614611013.543208517, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/joint6

[ERROR] [1614611013.543742768, 0.161000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/finger_joint1

解决方法

该条错误提示可以忽略。

十三、ROS-I的常见错误

1/usr/bin/ld: 找不到 -lindustrial_robot_client collect2: error: ld returned 1

原因

缺少ros-i的相关功能包

解决方法

sudo apt-get install ros-kinetic-industrial-core

创建server节点

1catkin_make出错:

CMakeFiles/server.dir/src/server.cpp.o:在函数‘actionlib::ActionServerBase<control_msgs::FollowJointTrajectoryAction_<std::allocator<void> > >::ActionServerBase(boost::function<void (actionlib::ServerGoalHandle<control_msgs::FollowJointTrajectoryAction_<std::allocator<void> > >)>, boost::function<void (actionlib::ServerGoalHandle<control_msgs::FollowJointTrajectoryAction_<std::allocator<void> > >)>, bool)’中:

server.cpp:(.text._ZN9actionlib16ActionServerBaseIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC2EN5boost8functionIFvNS_16ServerGoalHandleIS4_EEEEESB_b[_ZN9actionlib16ActionServerBaseIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC5EN5boost8functionIFvNS_16ServerGoalHandleIS4_EEEEESB_b]+0xa8):对‘actionlib::GoalIDGenerator::GoalIDGenerator()’未定义的引用

CMakeFiles/server.dir/src/server.cpp.o:在函数‘actionlib::StatusTracker<control_msgs::FollowJointTrajectoryAction_<std::allocator<void> > >::StatusTracker(boost::shared_ptr<control_msgs::FollowJointTrajectoryActionGoal_<std::allocator<void> > const> const&)’中:

server.cpp:(.text._ZN9actionlib13StatusTrackerIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC2ERKN5boost10shared_ptrIKNS1_32FollowJointTrajectoryActionGoal_IS3_EEEE[_ZN9actionlib13StatusTrackerIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC5ERKN5boost10shared_ptrIKNS1_32FollowJointTrajectoryActionGoal_IS3_EEEE]+0x6f):对‘actionlib::GoalIDGenerator::GoalIDGenerator()’未定义的引用

server.cpp:(.text._ZN9actionlib13StatusTrackerIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC2ERKN5boost10shared_ptrIKNS1_32FollowJointTrajectoryActionGoal_IS3_EEEE[_ZN9actionlib13StatusTrackerIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC5ERKN5boost10shared_ptrIKNS1_32FollowJointTrajectoryActionGoal_IS3_EEEE]+0xca):对‘actionlib::GoalIDGenerator::generateID()’未定义的引用

CMakeFiles/server.dir/src/server.cpp.o:在函数‘actionlib::StatusTracker<control_msgs::FollowJointTrajectoryAction_<std::allocator<void> > >::StatusTracker(actionlib_msgs::GoalID_<std::allocator<void> > const&, unsigned int)’中:

server.cpp:(.text._ZN9actionlib13StatusTrackerIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC2ERKN14actionlib_msgs7GoalID_IS3_EEj[_ZN9actionlib13StatusTrackerIN12control_msgs28FollowJointTrajectoryAction_ISaIvEEEEC5ERKN14actionlib_msgs7GoalID_IS3_EEj]+0x5c):对‘actionlib::GoalIDGenerator::GoalIDGenerator()’未定义的引用

collect2: error: ld returned 1 exit status

AUBO_robot/aubo_server/CMakeFiles/server.dir/build.make:113: recipe for target '/home/sun/catkin_ws/devel/lib/aubo_server/server' failed

make[2]: *** [/home/sun/catkin_ws/devel/lib/aubo_server/server] Error 1

CMakeFiles/Makefile2:1442: recipe for target 'AUBO_robot/aubo_server/CMakeFiles/server.dir/all' failed

make[1]: *** [AUBO_robot/aubo_server/CMakeFiles/server.dir/all] Error 2

Makefile:138: recipe for target 'all' failed

make: *** [all] Error 2

Invoking "make -j12 -l12" failed

解决办法

CMakleLists中的find_package添加actionlib.

十五、没有轨迹球或者轨迹球不能正常使用

原因:planning groups中的TIP link设置错误

解决办法:重新打开setup assistant进行设置

十六、 pip install --upgrade --user sympy==0.7.1或者pip3 install --upgrade --user sympy==0.7.1

Traceback (most recent call last):

File "/home/sun/.local/bin/pip", line 7, in <module>

from pip._internal.cli.main import main

File "/home/sun/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60

sys.stderr.write(f"ERROR: {exc}")

^

SyntaxError: invalid syntax

解决办法:

pip2 install --upgrade --user sympy==0.7.1

十七、WARNING: disk usage in log directory [/home/buu/.ros/log] is over 1GB.

It's recommended that you use the 'rosclean' command.

解决办法:rosclean purge

十八、VSCODE相关问题

1、vscode连接不到扩展商店

解决办法:设置-用户-应用程序-代理服务器,填写:http://127.0.0.1:7890

注意:开机之后,要先连接代理服务器(也就是在文件夹~/clash中打开终端并输入./clash -d .),否则还是连接不到扩展商店。

2、vscode中不能使用go to definition等功能

解决办法:安装扩展c/c++,安装完成后即可以使用。

3、可以安装中文简体插件使得页面变成中文的。

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

兔子的倔强

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值