zoukankan      html  css  js  c++  java
  • 9.2-nasa_r2实战1-安装与构造

    【ROS实战】机器人抓取仿真1-安装与构造

    前言

    • 机器人抓取操作仿真实战

    目录

    TOC

    参考

    catkin msg header generation issue
    nasa_ros_pkg

    学习记录

    下载

    • 下载nasa_r2_simulator-ingigo.zip, nasa_r2_common-hydro.zip, nasa_common_rosdep-master.zip, nasa_ros_pkg-deprecated_nasa_r2_common-xxx.zip
    • 解压前三个文件夹
    • 从nasa_ros_pkg-deprecated_nasa_r2_common-xxx.zip中复制nasa_r2_common_msgs到/masa_r2_common中

    构建

    修改包nasa_r2_common_msgs构造描述文件

    cmake_minimum_required(VERSION 2.8.3)
    project(nasa_r2_common_msgs)
    
    find_package(catkin REQUIRED COMPONENTS message_generation message_runtime std_msgs visualization_msgs geometry_msgs
        trajectory_msgs)
    
    ## Generate messages in the 'msg' folder
    add_message_files(
      FILES
      Gains.msg
      JointControl.msg
      JointStatusArray.msg
      JointStatus.msg
      PDMCStatus.msg
      PoseCommandArray.msg
      PoseCommand.msg
      PoseCommandParams.msg
      PoseCommandStatus.msg
      PoseTwistStamped.msg
      TorsoStatus.msg
    
        JointCommand.msg
        LabeledGripperPositionCommand.msg
        TorsoStatus.msg
        JointControlCalibrationMode.msg
        PDMCStatus.msg
        ForceControlAxisArray.msg
        ControllerJointSettings.msg
        ValueType.msg
        TrajectoryMonitorFactors.msg
        PoseTrajectoryReplan.msg
        Parameter.msg
        PoseCommandParams.msg
        PoseState.msg
        PoseTwistStamped.msg
        PriorityArray.msg
        LabeledTrajectoryMonitorFactors.msg
        LabeledGains.msg
        LabeledControllerJointSettings.msg
        VariantMapArray.msg
        JointTrajectoryReplan.msg
        JointControlData.msg
        JointControlMode.msg
        Gains.msg
        PowerState.msg
        VariantMap.msg
        JointControlClearFaultMode.msg
        JointCapability.msg
        PoseCommandStatus.msg
        SetParameterRequest.msg
        LabeledJointTrajectory.msg
        CommandStatus.msg
        JointStatusArray.msg
        ControllerPoseSettings.msg
        PoseCommandArray.msg
        JointControlDataArray.msg
        LabeledControllerPoseSettings.msg
        LabeledJointControlDataArray.msg
        SetParameterResponse.msg
        JointStatus.msg
        PoseCommand.msg
        SystemCore.msg
        SystemStatus.msg
        Modes.msg
        PoseTrajectoryPoint.msg
        JointControlCommandMode.msg
        JointControl.msg
        LabeledPoseTrajectory.msg
        WrenchMonitorLimit.msg
        JointControlCoeffState.msg
        WrenchState.msg
        PoseTrajectory.msg
        ForceControlAxis.msg
        LabeledJointState.msg
        StringArray.msg
        ReplanType.msg
        MappedType.msg
    
    )
    
    
    ## Generate services in the 'srv' folder
    add_service_files(
      FILES
      ParseTableScene.srv
      Power.srv
      ResetTableScene.srv
      Servo.srv
      SetJointMode.srv
      SetTipName.srv
      TakeSnapshot.srv
    
      SetTipName.srv
      Power.srv
      SetJointMode.srv
      TakeSnapshot.srv
      Servo.srv
      ResetTableScene.srv
      ParseTableScene.srv
    
    )
    
    ## Generate added messages and services with any dependencies listed here
    generate_messages(
      DEPENDENCIES
      std_msgs
      geometry_msgs
      visualization_msgs
    
      trajectory_msgs
    )
    
    catkin_package(
       CATKIN_DEPENDS 
        std_msgs 
        geometry_msgs
        visualization_msgs
        message_generation
        message_runtime
    )
    <?xml version="1.0"?>
    <package>
      <name>nasa_r2_common_msgs</name>
      <version>1.0.0</version>
      <description>Messages for dealing with the Robonaut2/ISS Taskboard</description>
      <maintainer email="stephen.hart@nasa.gov">Stephen Hart</maintainer>
      <maintainer email="davidvlu@gmail.com">David V. Lu!!</maintainer>
      <license>BSD</license>
      <url type="website">http://ros.org/wiki/r2_msgs</url>
      <buildtool_depend>catkin</buildtool_depend>
      <build_depend>std_msgs</build_depend>
      <build_depend>geometry_msgs</build_depend>
      <build_depend>visualization_msgs</build_depend>
      <build_depend>message_runtime</build_depend>
      <build_depend>message_generation</build_depend>
    
      <run_depend>std_msgs</run_depend>
      <run_depend>visualization_msgs</run_depend>
      <run_depend>geometry_msgs</run_depend>
      <run_depend>message_runtime</run_depend>
      <run_depend>message_generation</run_depend>
    </package>

    修改 gazebo_taskboard 构造描述文件

    cmake_minimum_required(VERSION 2.8.3)
    project(gazebo_taskboard)
    add_definitions(-std=c++11)
    # xxxxxxx
    add_dependencies(gazebo_taskboard gazebo_taskboard_generate_messages_cpp)
    <?xml version="1.0"?>
    <package>
      <name>gazebo_taskboard</name>
      <version>0.5.3</version>
      <description>The gazebo_taskboard package</description>
    
      <maintainer email="stephen.hart@nasa.gov">Stephen Hart</maintainer>
      <maintainer email="davidvlu@gmail.com">David Lu!!</maintainer>
    
      <!-- One license tag required, multiple allowed, one license per tag -->
      <!-- Commonly used license strings: -->
      <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
      <license>TODO</license>
    
      <url type="website">http://wiki.ros.org/gazebo_taskboard</url>
    
      <buildtool_depend>catkin</buildtool_depend>
      <build_depend>roscpp</build_depend>
      <build_depend>rospy</build_depend>
      <build_depend>std_msgs</build_depend>
      <build_depend>gazebo</build_depend>
      <build_depend>message_generation</build_depend>
    
      <run_depend>message_runtime</run_depend>
      <run_depend>std_msgs</run_depend>
      <run_depend>pluginlib</run_depend>
      <run_depend>actionlib</run_depend>
      <run_depend>geometry_msgs</run_depend>
      <run_depend>rostest</run_depend>
      <run_depend>message_generation</run_depend>
    
      <export>
        <gazebo plugin_path="${prefix}/lib" />
      </export>
    </package>

    修改gazebo_gripper, gazebo_interface构造描述文件

    add_definitions(-std=c++11)

    catkin_make

    • 应该不会出错

    roslaunch

    • 请结合gazebo操作帮助文档,使用r2_gazebo中的launch文件

    下期预告

    • 【ROS实战】机器人抓取仿真2-模型与控制
  • 相关阅读:
    php读写json文件
    BasicPHPLite v1.0.1 轻量级PHP框架
    XAMPP如何修改默认的网站目录htdocs方法详解
    zend framework firephp 调试函数
    SMARTY模板中如何使用get,post,request,cookies,session,server变量
    获取服务器信息
    phpmail发送邮件
    moodle安装小结
    dotproject安装及 修正甘特图乱码
    不要再ifelse中嵌套ifesle
  • 原文地址:https://www.cnblogs.com/lizhensheng/p/11117735.html
Copyright © 2011-2022 走看看