ROS下UR机械臂仿真控制失败(机械臂躺着)
程序员文章站
2024-03-15 14:01:47
...
描述
在使用ROS的kinetic版本控制UR机械臂时,moveit规划成功但UR机械臂不运动的问题
失败表现
UR机械臂在Gazebo环境下,绵软无力的倒在地上,在rviz环境下一直是横着倒下的姿态,机械臂末端一直位于地面之下
成功的截图如下
注意到,MotionPlanning界面下的“Commands”下有四个按钮,分别是“plan”、“Execute”、“Plan and Execute”和“Stop”
下面有一个提示,截图中是“Executed”,也即是我运动成功了,可以看到我的UR机械臂已经直立了
这里没有截出失败的示意图。失败时,“Executed”的位置为“failed”。机械臂一直是倒下的状态。
问题提示
在执行命令roslaunch ur5_moveit_config moveit_rviz.launch config:=true
的终端上,有如下提示
ABORTED: Solution found but controller failed during execution
意思就是说,规划成功但是控制器执行失败
这时你可以去运行命令roslaunch ur5_gazebo ur5.launch
的窗口,寻找以下,会发现包含以下一个提示信息
rospy.service.ServiceException: transport error completing service call: receive_once[/controller_manager/load_controller]: DeserializationError cannot deserialize: unknown error handler name 'rosmsg
执行命令来安装rosmsg
sudo apt-get install ros-kinetic-rosmsg
仍然不成功
最终解决办法
执行命令
rosservice call /controller_manager/list_controller_types "{}"
终端提示失败
ERROR: transport error completing service call: receive_once[/controller_manager/list_controller_types]: DeserializationError cannot deserialize: unknown error handler name 'rosmsg'
发现这个提示和gazebo中的提示是一样的。因此判断它是核心问题。
执行以下命令后,问题解决
sudo apt-get install ros-kinetic-genpy
如果这个时候你再执行命令
rosservice call /controller_manager/list_controller_types "{}"
终端会返回
types: [ackermann_steering_controller/AckermannSteeringController, controller_manager_tests/EffortTestController,
controller_manager_tests/MyDummyController, controller_manager_tests/PosEffController,
controller_manager_tests/PosEffOptController, controller_manager_tests/VelEffController,
diff_drive_controller/DiffDriveController, effort_controllers/GripperActionController,
effort_controllers/JointEffortController, effort_controllers/JointGroupEffortController,
effort_controllers/JointGroupPositionController, effort_controllers/JointPositionController,
effort_controllers/JointTrajectoryController, effort_controllers/JointVelocityController,
force_torque_sensor_controller/ForceTorqueSensorController, imu_sensor_controller/ImuSensorController,
joint_state_controller/JointStateController, pos_vel_acc_controllers/JointTrajectoryController,
pos_vel_controllers/JointTrajectoryController, position_controllers/GripperActionController,
position_controllers/JointGroupPositionController, position_controllers/JointPositionController,
position_controllers/JointTrajectoryController, velocity_controllers/JointGroupVelocityController,
velocity_controllers/JointPositionController, velocity_controllers/JointTrajectoryController,
velocity_controllers/JointVelocityController]
base_classes: ['controller_interface::ControllerBase', 'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase',
'controller_interface::ControllerBase', 'controller_interface::ControllerBase']
上一篇: 关于java数组的一些总结
下一篇: 单片机控制点阵字符显示及字模提取原理