解决OpenManipulator机械臂功能包编译失败及安装方法(open_manipulator、dynamixel_workbench、dynamixel_SDK......等)

解决OpenManipulator机械臂功能包编译失败及安装方法(open_manipulator、dynamixel_workbench、dynamixel_SDK......等)


1、如果出现这样的问题再往下看

解决OpenManipulator机械臂功能包编译失败及安装方
(open_manipulator、dynamixel_workbench、dynamixel_SDK等)
基于Ubuntu16.04

在这里插入图片描述

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake:95 (message):
  This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead.
Call Stack (most recent call first):
  CMakeLists.txt:67 (catkin_workspace)

2、解决方法

出现问题的原因:功能包中缺少CmakeLists文件(解决方法一共5步)

  1. 进入保存OpenManipulator相关功能包的文件夹,进入build 文件夹
  2. 进入catkin_generated文件夹
  3. 进入metapackages文件夹
  4. 分别复制dynamixel_workbench、open_manipulator、open_manipulator_simulations中的CMakeLists.txt
    需要找的文件的位置
  5. 分别放到对应的功能包中,此处只用dynamixel_workbench举例,放置的位置如下:src/dynamixel_workbench/dynamixel_workbench需要放置的位置
    然后再重新编译就大功告成!附一张成功的图片(编写不易希望大家成功后点个赞OR关注):
    编译成功
    -------------------------分界线成功的不用往下看(以下是如何下载安装功能包)--------------------------

3、安装OpenManipulator机械臂功能包

(open_manipulator、dynamixel_workbench、dynamixel_SDK…等)

sudo apt-get install ros-kinetic-ros-controllers ros-kinetic-gazebo* ros-kinetic-moveit* ros-kinetic-industrial-core
mkdir -p ~/openManipulator_ws/src/ && cd ~/openManipulator_ws/src/
git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git
git clone https://github.com/ROBOTIS-GIT/dynamixel-workbench.git
git clone https://github.com/ROBOTIS-GIT/dynamixel-workbench-msgs.git
git clone https://github.com/ROBOTIS-GIT/open_manipulator.git
git clone https://github.com/ROBOTIS-GIT/open_manipulator_msgs.git
git clone https://github.com/ROBOTIS-GIT/open_manipulator_simulations.git
git clone https://github.com/ROBOTIS-GIT/robotis_manipulator.git
git clone https://github.com/ROBOTIS-GIT/open_manipulator_applications.git
git clone https://github.com/ROBOTIS-GIT/open_manipulator_controls.git
cd ~/openManipulator_ws && catkin_make
echo "source ~/openManipulator_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

如果下载不了出现网络问题可以参考本人另外一篇文章:ROS无法连接raw.githubusercontent.com和raw.github.com的问题

大功告成!编写不易,希望大家成功有点个关注or赞谢谢~~~

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
下面是一个设置具有允许误差的位置约束的代码示例: ```python from moveit_msgs.msg import Constraints, PositionConstraint from geometry_msgs.msg import PoseStamped # 创建一个约束对象 constraints = Constraints() # 创建一个位置约束对象 position_constraint = PositionConstraint() # 设置约束的参考坐标系和目标姿态 position_constraint.header.frame_id = "base_link" # 设置目标位置 target_pose = PoseStamped() target_pose.header.frame_id = "base_link" target_pose.pose.position.x = 0.5 target_pose.pose.position.y = 0.2 target_pose.pose.position.z = 0.8 # 设置允许误差 position_constraint.constraint_region.primitive_poses.append(target_pose.pose) position_constraint.constraint_region.primitives[0].type = 1 # 设置为SPHERE类型 position_constraint.weight = 1.0 position_constraint.absolute_x_axis_tolerance = 0.01 position_constraint.absolute_y_axis_tolerance = 0.01 position_constraint.absolute_z_axis_tolerance = 0.01 # 将位置约束添加到约束对象中 constraints.position_constraints.append(position_constraint) # 将约束对象传递给MoveGroupCommander对象 move_group = MoveGroupCommander("manipulator") move_group.set_path_constraints(constraints) ``` 在上面的代码中,我们首先创建了一个Constraints对象和一个PositionConstraint对象,然后设置了约束的参考坐标系和目标姿态。接着,我们设置了允许误差以及三个方向上的绝对容忍度。最后,我们将位置约束添加到约束对象中,并将约束对象传递给MoveGroupCommander对象。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

Callme_TeacherPi

谢谢老板!

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

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

打赏作者

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

抵扣说明:

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

余额充值