// Because autuator's direction is not unified, the signs of positive and // negative may have problem in the following formula. voidArmRobotHardware::transPositionActuatorToJoint() { jnt_pos_["joint_lift"] = -act_pos_["actuator_lift"] * 0.010; jnt_pos_["joint_waist"] = act_pos_["actuator_waist"]; jnt_pos_["joint_big_arm"] = -act_pos_["actuator_big_arm"] * 0.600; jnt_pos_["joint_forearm"] = -(act_pos_["actuator_forearm"] + act_pos_["actuator_big_arm"]); jnt_pos_["joint_wrist_pitching"] = -(-act_pos_["actuator_big_arm"] * 0.6400 - act_pos_["actuator_forearm"] * 1.6000 + (act_pos_["actuator_wrist_left"] + act_pos_["actuator_wrist_right"]) * 0.8000); jnt_pos_["joint_wrist_rotation"] = (act_pos_["actuator_wrist_left"] - act_pos_["actuator_wrist_right"]) * 0.6316; }
MoveIt! is state of the art software for mobile manipulation, incorporating the latest advances in motion planning, manipulation, 3D perception, kinematics, control and navigation. It provides an easy-to-use platform for developing advanced robotics applications, evaluating new robot designs and building integrated robotics products for industrial, commercial, R&D and other domains.
<!-- The following xacro:include files set up definitions of parts of the robot body --> <xacro:includefilename="$(find xm_arm_description)/urdf/materials.urdf.xacro" /> <xacro:includefilename="$(find xm_arm_description)/urdf/xm_base.urdf.xacro" /> <xacro:includefilename="$(find xm_arm_description)/urdf/xm_wheel.urdf.xacro" /> <xacro:includefilename="$(find xm_arm_description)/urdf/xm_arm.urdf.xacro" /> <xacro:includefilename="$(find xm_arm_description)/urdf/xm_gripper.urdf.xacro" /> <xacro:includefilename="$(find xm_arm_description)/urdf/xm_kinect.urdf.xacro" /> <xacro:includefilename="$(find xm_arm_description)/urdf/xm_laser.urdf.xacro" />
<!-- Attach the base --> <basename="base"color="DarkGrey" />
planner_configs: SBLkConfigDefault: type:geometric::SBL range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() ESTkConfigDefault: type:geometric::EST range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0 setup() goal_bias:0.05# When close to goal select goal, with this probability. default: 0.05 LBKPIECEkConfigDefault: type:geometric::LBKPIECE range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() border_fraction:0.9# Fraction of time focused on boarder default: 0.9 min_valid_path_fraction:0.5# Accept partially valid moves above fraction. default: 0.5 BKPIECEkConfigDefault: type:geometric::BKPIECE range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() border_fraction:0.9# Fraction of time focused on boarder default: 0.9 failed_expansion_score_factor:0.5# When extending motion fails, scale score by factor. default: 0.5 min_valid_path_fraction:0.5# Accept partially valid moves above fraction. default: 0.5 KPIECEkConfigDefault: type:geometric::KPIECE range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() goal_bias:0.05# When close to goal select goal, with this probability. default: 0.05 border_fraction:0.9# Fraction of time focused on boarder default: 0.9 (0.0,1.] failed_expansion_score_factor:0.5# When extending motion fails, scale score by factor. default: 0.5 min_valid_path_fraction:0.5# Accept partially valid moves above fraction. default: 0.5 RRTkConfigDefault: type:geometric::RRT range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() goal_bias:0.05# When close to goal select goal, with this probability? default: 0.05 RRTConnectkConfigDefault: type:geometric::RRTConnect range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() RRTstarkConfigDefault: type:geometric::RRTstar range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() goal_bias:0.05# When close to goal select goal, with this probability? default: 0.05 delay_collision_checking:1# Stop collision checking as soon as C-free parent found. default 1 TRRTkConfigDefault: type:geometric::TRRT range:0.0# Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() goal_bias:0.05# When close to goal select goal, with this probability? default: 0.05 max_states_failed:10# when to start increasing temp. default: 10 temp_change_factor:2.0# how much to increase or decrease temp. default: 2.0 min_temperature:10e-10# lower limit of temp change. default: 10e-10 init_temperature:10e-6# initial temperature. default: 10e-6 frountier_threshold:0.0# dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() frountierNodeRatio:0.1# 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 k_constant:0.0# value used to normalize expresssion. default: 0.0 set in setup() PRMkConfigDefault: type:geometric::PRM max_nearest_neighbors:10# use k nearest neighbors. default: 10 PRMstarkConfigDefault: type:geometric::PRMstar xm_arm: planner_configs: -SBLkConfigDefault -ESTkConfigDefault -LBKPIECEkConfigDefault -BKPIECEkConfigDefault -KPIECEkConfigDefault -RRTkConfigDefault -RRTConnectkConfigDefault -RRTstarkConfigDefault -TRRTkConfigDefault -PRMkConfigDefault -PRMstarkConfigDefault projection_evaluator:joints(joint_lift,joint_waist) longest_valid_segment_fraction:0.05 xm_gripper: planner_configs: -SBLkConfigDefault -ESTkConfigDefault -LBKPIECEkConfigDefault -BKPIECEkConfigDefault -KPIECEkConfigDefault -RRTkConfigDefault -RRTConnectkConfigDefault -RRTstarkConfigDefault -TRRTkConfigDefault -PRMkConfigDefault -PRMstarkConfigDefault projection_evaluator:joints(joint_finger_left,joint_finger_right) longest_valid_segment_fraction:0.05
<?xml version="1.0" ?> <!--This does not replace URDF, and is not an extension of URDF. This is a format for representing semantic information about the robot structure. A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined --> <robotname="xmbot"> <!--GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc--> <!--LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included--> <!--JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included--> <!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group--> <!--SUBGROUPS: Groups can also be formed by referencing to already defined group names--> <groupname="xm_arm"> <jointname="joint_lift" /> <jointname="joint_waist" /> <jointname="joint_big_arm" /> <jointname="joint_forearm" /> <jointname="joint_wrist_pitching" /> <jointname="joint_wrist_rotation" /> <chainbase_link="link_lift"tip_link="link_gripper_frame" /> </group> <groupname="xm_gripper"> <linkname="link_finger_left" /> <linkname="link_finger_right" /> <jointname="joint_finger_left" /> <jointname="joint_finger_right" /> </group> <!--GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'--> <group_statename="initial"group="xm_arm"> <jointname="joint_big_arm"value="1.309" /> <jointname="joint_forearm"value="2.182" /> <jointname="joint_lift"value="0" /> <jointname="joint_waist"value="-0.96" /> <jointname="joint_wrist_pitching"value="0" /> <jointname="joint_wrist_rotation"value="0" /> </group_state> <group_statename="prepare"group="xm_arm"> <jointname="joint_big_arm"value="1.309" /> <jointname="joint_forearm"value="2.182" /> <jointname="joint_lift"value="0" /> <jointname="joint_waist"value="0" /> <jointname="joint_wrist_pitching"value="0" /> <jointname="joint_wrist_rotation"value="0" /> </group_state> <group_statename="straight"group="xm_arm"> <jointname="joint_big_arm"value="0" /> <jointname="joint_forearm"value="0" /> <jointname="joint_lift"value="0" /> <jointname="joint_waist"value="0" /> <jointname="joint_wrist_pitching"value="0" /> <jointname="joint_wrist_rotation"value="0" /> </group_state> <!--END EFFECTOR: Purpose: Represent information about an end effector.--> <end_effectorname="xm_effector"parent_link="link_gripper_frame"group="xm_gripper"parent_group="xm_arm" /> <!--VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)--> <virtual_jointname="base_odom"type="fixed"parent_frame="odom"child_link="base_footprint" /> <!--DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. --> <disable_collisionslink1="base_footprint"link2="base_link"reason="Adjacent" /> <disable_collisionslink1="base_footprint"link2="link_big_arm"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_kinect"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_laser"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_lift"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_waist"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_wheel_1"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="base_footprint"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="base_link"link2="link_kinect"reason="Adjacent" /> <disable_collisionslink1="base_link"link2="link_laser"reason="Adjacent" /> <disable_collisionslink1="base_link"link2="link_lift"reason="Adjacent" /> <disable_collisionslink1="base_link"link2="link_waist"reason="Never" /> <disable_collisionslink1="base_link"link2="link_wheel_1"reason="Adjacent" /> <disable_collisionslink1="base_link"link2="link_wheel_2"reason="Adjacent" /> <disable_collisionslink1="base_link"link2="link_wheel_3"reason="Adjacent" /> <disable_collisionslink1="link_big_arm"link2="link_finger_left"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_finger_right"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_forearm"reason="Adjacent" /> <disable_collisionslink1="link_big_arm"link2="link_kinect"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_lift"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_waist"reason="Adjacent" /> <disable_collisionslink1="link_big_arm"link2="link_wheel_1"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_big_arm"link2="link_wrist_rotation"reason="Never" /> <disable_collisionslink1="link_finger_left"link2="link_finger_right"reason="Never" /> <disable_collisionslink1="link_finger_left"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_finger_left"link2="link_wrist_rotation"reason="Adjacent" /> <disable_collisionslink1="link_finger_right"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_finger_right"link2="link_wrist_rotation"reason="Adjacent" /> <disable_collisionslink1="link_forearm"link2="link_waist"reason="Never" /> <disable_collisionslink1="link_forearm"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_forearm"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_forearm"link2="link_wrist_pitching"reason="Adjacent" /> <disable_collisionslink1="link_forearm"link2="link_wrist_rotation"reason="Never" /> <disable_collisionslink1="link_kinect"link2="link_laser"reason="Never" /> <disable_collisionslink1="link_kinect"link2="link_lift"reason="Never" /> <disable_collisionslink1="link_kinect"link2="link_waist"reason="Never" /> <disable_collisionslink1="link_kinect"link2="link_wheel_1"reason="Never" /> <disable_collisionslink1="link_kinect"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_kinect"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_laser"link2="link_lift"reason="Never" /> <disable_collisionslink1="link_laser"link2="link_waist"reason="Never" /> <disable_collisionslink1="link_laser"link2="link_wheel_1"reason="Never" /> <disable_collisionslink1="link_laser"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_laser"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_lift"link2="link_waist"reason="Adjacent" /> <disable_collisionslink1="link_lift"link2="link_wheel_1"reason="Never" /> <disable_collisionslink1="link_lift"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_lift"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_lift"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_waist"link2="link_wheel_1"reason="Never" /> <disable_collisionslink1="link_waist"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_waist"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_waist"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_wheel_1"link2="link_wheel_2"reason="Never" /> <disable_collisionslink1="link_wheel_1"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_wheel_2"link2="link_wheel_3"reason="Never" /> <disable_collisionslink1="link_wheel_2"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_wheel_3"link2="link_wrist_pitching"reason="Never" /> <disable_collisionslink1="link_wheel_3"link2="link_wrist_rotation"reason="Never" /> <disable_collisionslink1="link_wrist_pitching"link2="link_wrist_rotation"reason="Adjacent" /> </robot>
<!-- By default, we do not start a database (it can be large) --> <argname="db"default="false" />
<!-- By default, we are not in debug mode --> <argname="debug"default="false" />
<!-- Load the URDF, SRDF and other .yaml configuration files on the param server --> <includefile="$(find xm_arm_moveit_config)/launch/planning_context.launch"> <argname="load_robot_description"value="true"/> </include>
<!-- If needed, broadcast static tf for robot root -->
<!-- We do not have a robot connected, so publish fake joint states --> <nodename="joint_state_publisher"pkg="joint_state_publisher"type="joint_state_publisher"> <paramname="/use_gui"value="false"/> <rosparamparam="/source_list">[/move_group/fake_controller_joint_states]</rosparam> </node>
<!-- Given the published joint states, publish tf for the robot links --> <nodename="robot_state_publisher"pkg="robot_state_publisher"type="robot_state_publisher"respawn="true"output="screen" />
<!-- Run the main MoveIt executable without trajectory execution (we do not have controllers configured by default) --> <includefile="$(find xm_arm_moveit_config)/launch/move_group.launch"> <argname="allow_trajectory_execution"value="true"/> <argname="fake_execution"value="true"/> <argname="info"value="true"/> <argname="debug"value="$(arg debug)"/> </include>
<!-- Run Rviz and load the default config to see the state of the move_group node --> <includefile="$(find xm_arm_moveit_config)/launch/moveit_rviz.launch"> <argname="config"value="true"/> <argname="debug"value="$(arg debug)"/> </include>
<!-- If database loading was enabled, start mongodb as well --> <includefile="$(find xm_arm_moveit_config)/launch/default_warehouse_db.launch"if="$(arg db)"/>
<!-- Start the actual move_group node/action server --> <nodename="move_group"launch-prefix="$(arg launch_prefix)"pkg="moveit_ros_move_group"type="move_group"respawn="false"output="screen"args="$(arg command_args)"> <!-- Set the display variable, in case OpenGL code is used internally --> <envname="DISPLAY"value="$(optenv DISPLAY :0)" />
<!-- Publish the planning scene of the physical robot so that rviz plugin can know actual robot --> <paramname="planning_scene_monitor/publish_planning_scene"value="$(arg publish_monitored_planning_scene)" /> <paramname="planning_scene_monitor/publish_geometry_updates"value="$(arg publish_monitored_planning_scene)" /> <paramname="planning_scene_monitor/publish_state_updates"value="$(arg publish_monitored_planning_scene)" /> <paramname="planning_scene_monitor/publish_transforms_updates"value="$(arg publish_monitored_planning_scene)" /> </node>
<launch> <!-- By default we do not overwrite the URDF. Change the following to true to change the default behavior --> <argname="load_robot_description"default="false"/>
<!-- The name of the parameter under which the URDF is loaded --> <argname="robot_description"default="robot_description"/>
<!-- The semantic description that corresponds to the URDF --> <paramname="$(arg robot_description)_semantic"textfile="$(find xm_arm_moveit_config)/config/xmbot.srdf" />
<!-- Load updated joint limits (override information from URDF) --> <groupns="$(arg robot_description)_planning"> <rosparamcommand="load"file="$(find xm_arm_moveit_config)/config/joint_limits.yaml"/> </group>
<!-- Load default settings for kinematics; these settings are overridden by settings in a node's namespace --> <groupns="$(arg robot_description)_kinematics"> <rosparamcommand="load"file="$(find xm_arm_moveit_config)/config/kinematics.yaml"/> </group>
<!-- Set the param that trajectory_execution_manager needs to find the controller plugin --> <argname="moveit_controller_manager"default="moveit_simple_controller_manager/MoveItSimpleControllerManager" /> <paramname="moveit_controller_manager"value="$(arg moveit_controller_manager)"/>
<!-- Load joint controller configurations from YAML file to parameter server --> <rosparamfile="$(find xm_arm_moveit_config)/config/controllers.yaml"/>