aubo_i5基于Octomap的避障

一.Ubuntu18.04下使用ros进行aubo机械臂rviz仿真

1.参考链接

二.aubo_i5+Kinect v2手眼标定

2.方法

三.基于Octomap静态地图构建

1.修改easy_handeye自带的publish.launch文件

<?xml version="1.0"?>
<launch>
    <arg name="eye_on_hand" doc="eye-on-hand instead of eye-on-base" default="false" />
    <!--arg name="namespace_prefix" default="ur3_kinect_handeyecalibration" /-->
    <arg name="namespace_prefix" default="aubo_i5_kinect_handeyecalibration" />
    <arg if="$(arg eye_on_hand)" name="namespace" value="$(arg namespace_prefix)_eye_on_hand" />
    <arg unless="$(arg eye_on_hand)" name="namespace" value="$(arg namespace_prefix)_eye_on_base" />

    <!--it is possible to override the link names saved in the yaml file in case of name clashes, for example-->
    <arg if="$(arg eye_on_hand)" name="robot_effector_frame" default="" />
    <arg unless="$(arg eye_on_hand)" name="robot_base_frame" default="" />
    <arg name="tracking_base_frame" default="" />
    
    <arg name="inverse" default="false" />
    
    <!--publish hand-eye calibration-->
    <group ns="$(arg namespace)">
        <param name="eye_on_hand" value="$(arg eye_on_hand)" />
        <param unless="$(arg eye_on_hand)" name="robot_base_frame" value="$(arg robot_base_frame)" />
        <param if="$(arg eye_on_hand)" name="robot_effector_frame" value="$(arg robot_effector_frame)" />
        <param name="tracking_base_frame" value="$(arg tracking_base_frame)" />
        <param name="inverse" value="$(arg inverse)" />
        <node name="$(anon handeye_publisher)" pkg="easy_handeye" type="publish.py" output="screen"/>
    </group>
    <!--node pkg="tf" type="static_transform_publisher"  name="link1_broadcaster" args="-0.7111208301957235  0.8221538170167787  0.40000751341893015 -0.19009128487976332 0.7372602181756381 -0.6294715435902674   0.15517167885428526 base camera_link 100 "/-->

    <node pkg="tf" type="static_transform_publisher"  name="link1_broadcaster" args="-0.10855619090526175  -1.57207693625539  0.5927385133279733 -0.7006653080002005 -0.14403069755411202 0.1454984302581171   0.6834862771990992 base camera_link 100 "/>

</launch>

2.编写aubo.luanch

<launch>
	
   <!-- start the robot -->
<include file="$(find aubo_i5_moveit_config)/launch/moveit_planning_execution.launch">
	<arg name="sim" value="false" />
        <arg name="robot_ip" value="192.168.1.135" />
</include>
 
 
  <!-- start the kinect2 -->  
  <include file="$(find kinect2_bridge)/launch/kinect2_bridge.launch" />
  <include file="$(find easy_handeye)/launch/publish.launch" />
</launch>

3.配置aubo_i5_moveit_config/config/sensors_kinect.yaml

  • padding_offset: The size of the padding (in cm).
  • padding_scale: The scale of the padding
# The name of this file shouldn't be changed, or else the Setup Assistant won't detect it
sensors:
  - sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater

    point_cloud_topic: /kinect2/qhd/points

    max_range: 3.0

    point_subsample: 1

    padding_offset: 0.1

    padding_scale: 1.8

    max_update_rate: 1.0

    filtered_cloud_topic: filtered_cloud

4.配置aubo_i5_moveit_config/launch/sensor_manager.launch.xml

<launch>

  <!-- This file makes it easy to include the settings for sensor managers -->

  <!-- Params for 3D sensors config -->
  <rosparam command="load" file="$(find aubo_i5_moveit_config)/config/sensors_3d.yaml" />

  <!-- Params for the octomap monitor -->
  <!--  <param name="octomap_frame" type="string" value="some frame in which the robot moves" /> -->
  <param name="octomap_resolution" type="double" value="0.025" />
  <param name="max_range" type="double" value="5.0" />

  <!-- Load the robot specific sensor manager; this sets the moveit_sensor_manager ROS parameter -->
  <arg name="moveit_sensor_manager" default="aubo_i5" />
  <include file="$(find aubo_i5_moveit_config)/launch/$(arg moveit_sensor_manager)_moveit_sensor_manager.launch.xml" />
  <rosparam command="load" file="$(find aubo_i5_moveit_config)/config/sensors_kinect.yaml" />

  <param name="octomap_frame" type="string" value="odom_combined" />

  <param name="octomap_resolution" type="double" value="0.05" />

  <param name="max_range" type="double" value="5.0" />
</launch>

5.source ~/aubo_ws/devel/setup.sh

    roslaunch aubo.launch

涉及的bug:

1.ERROR: Unable to sample any valid states for goal tree

    解决方法(设置位置的允许误差或者将关节位置小数点后数据去掉):

group.setGoalPositionTolerance(0.01);
group.setGoalOrientationTolerance(0.1);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值