UR5_gripper_camera_gazebo(无moveit)
视频讲解
B站-我要一米八了-抓取不止!Ubuntu 18.04下UR5机械臂搭建Gazebo环境|开源分享
运行步骤
1.创建工作空间
catkin_make
2.激活环境变量
source devel/setup.bash
3.1 rviz下查看模型
roslaunch gjt_ur_description view_ur5_robotiq85_gripper.launch
3.2 gazebo下仿真
roslaunch gjt_ur_gazebo ur5.launch
4.查看相机内容(RGB,Depth)
rqt_image_view
遇到的报错
1.缺少依赖包
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by “object_recognition_msgs” with any of the following names: object_recognition_msgsConfig.cmake object_recognition_msgs-config.cmake Add the installation prefix of “object_recognition_msgs” to CMAKE_PREFIX_PATH or set “object_recognition_msgs_DIR” to a directory containing one of the above files. If “object_recognition_msgs” provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): gripper_breakdown_solution-master/gazebo_plugins/household_objects_database_msgs/CMakeLists.txt:11 (find_package)
ROS依赖包安装问题 sudo apt-get installros-melodic-PACKAGE
ERROR: cannot launch node of type [joint_state_publisher_gui/joint_state_publisher_gui]: joint_state_publisher_gui
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/jjm/Geo-JTao/ur_ws/src
ROS path [2]=/opt/ros/melodic/share
joint-state-publisher-gui
ERROR: cannot launch node of type [rqt_joint_trajectory_controller/rqt_joint_trajectory_controller]: rqt_joint_trajectory_controller
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/jjm/Geo-JTao/ur_ws/src
ROS path [2]=/opt/ros/melodic/share
解决方法
sudo apt-get install ros-melodic-object-recognition-msgs
sudo apt-get install ros-melodic-joint-state-publisher-gui
sudo apt-get install ros-melodic-rqt-joint-trajectory-controller
2.gazebo相关
[Err] [GazeboGraspGripper.cpp:64] GazeboGraspGripper: Palm link ee_link not found. The gazebo grasp plugin will not work.
[Err] [GazeboGraspFix.cpp:231] GazeboGraspFix: Could not initialize arm gripper_arm. Skipping.
[Err] [GazeboGraspFix.cpp:261] ERROR: GazeboGraspFix: Cannot use a GazeboGraspFix because no arms were configured successfully. Plugin will not work.
[ERROR] [1715240504.803342626, 1.385000000]: Could not load controller ‘arm_controller’ because controller type ‘position_controllers/JointTrajectoryController’ does not exist.
[ERROR] [1715240504.803401831, 1.385000000]: Use ‘rosservice call controller_manager/list_controller_types’ to get the available types
[Wrn] [msgs.cc:1852] Conversion of sensor type[depth] not supported
[ERROR] [1715240504.826520614, 1.407000000]: Could not load controller ‘gripper’ because controller type ‘position_controllers/JointTrajectoryController’ does not exist.
[ERROR] [1715240504.826567348, 1.407000000]: Use ‘rosservice call controller_manager/list_controller_types’ to get the available types
Error when loading ‘gripper’
[ERROR] [1715240504.836587554, 1.417000000]: Could not start controller with name ‘arm_controller’ because no controller with this name exists
Error when starting [‘arm_controller’] and stopping []
[ERROR] [1715240504.845541877, 1.426000000]: Could not start controller with name ‘gripper’ because no controller with this name exists
Error when starting [‘gripper’] and stopping []
[Wrn] [ModelDatabase.cc:340] Getting models from[http://gazebosim.org/models/]. This may take a few seconds.
[Err] [ModelDatabase.cc:235] No tag in the model database database.config found here[http://gazebosim.org/models/]
[Err] [ModelDatabase.cc:294] Unable to download model manifests
[Err] [ModelDatabase.cc:414] Unable to download model[model://cafe_table/meshes/cafe_table.dae]
[Err] [SystemPaths.cc:412] File or path does not exist[“”]
[Err] [Visual.cc:2824] No mesh specified
[Wrn] [ModelDatabase.cc:340] Getting models from[http://gazebosim.org/models/]. This may take a few seconds.
[joint_state_controller_spawner-7] process has finished cleanly
log file: /home/jjm/.ros/log/92267466-0dd7-11ef-8609-000c2996a999/joint_state_controller_spawner-7*.log
[arm_controller_spawner-8] process has finished cleanly
log file: /home/jjm/.ros/log/92267466-0dd7-11ef-8609-000c2996a999/arm_controller_spawner-8*.log
VMware: vmw_ioctl_command error 无效的参数.
Aborted (core dumped)
解决方法
安装对应的ROS控制包
sudo apt-get update
sudo apt-get install ros-melodic-joint-trajectory-controller
sudo apt-get install ros-melodic-position-controllers
sudo apt-get install ros-melodic-joint-state-controller
sudo apt-get install ros-melodic-effort-controllers
http://gazebosim.org/models/地址已经变换http://models.gazebosim.org,因此无法下载所需模型
下载Gazebo模型到本地~/.gazebo/models
cd ~/.gazebo/models/
wget http://file.ncnynl.com/ros/gazebo_models.txt
wget -i gazebo_models.txt
ls model.tar.g* | xargs -n1 tar xzvf
grasp-fix插件加载了两次,查看夹爪的urdf文件,发现下载的夹爪功能包中robotiq_85_gripper.urdf.xacro文件也加载了gazebo_grasp_fix插件,将其注释掉
设置gazebo环境变量
关于Gazebo [Err] [REST.cc:205] Error in REST request 问题的解决