Ask Your Question

Unable to set solver_type in launch file via kinematics.yaml or param/rosparam for trac_ik [closed]

asked 2016-07-01 18:50:58 -0600

CMobley7 gravatar image

To Whom It May Concern,

After installing trac-ik-kinematics-plugin, I changed the kinematics.yaml to use trac_ik vs ur_kinematics and my Clearpath Husky with UR5 arm successfully planned several IK problems.

However, when I use the code below:

# Give the node a name
rospy.init_node("drill_prediction", anonymous=False)
# Initialize the move_group API
# Initialize the move group for the arm
ur5_arm = moveit_commander.MoveGroupCommander("ur5_arm")
# Get the name of the end-effector link
end_effector_link = ur5_arm.get_end_effector_link()
# Set the reference frame for pose targets
 reference_frame = "/base_link"
# Set the arm reference frame accordingly
# Allow replanning to increase the odds of a solution
# Allow some leeway in position (meters) and orientation (radians)
#Move the end effecor to the x , y, z positon
#Set the target pose in the base_link frame
target_pose = PoseStamped()
target_pose.header.frame_id = reference_frame
target_pose.header.stamp =
target_pose.pose.position.x = 1.0 #hole_pose.position.x
target_pose.pose.position.y = .1 #hole_pose.position.y
target_pose.pose.position.z = .7 #hole_pose.position.z
target_pose.pose.orientation.x = 0 #hole_pose.orientation.x
target_pose.pose.orientation.y = 0 #hole_pose.orientation.y
target_pose.pose.orientation.z = 0 #hole_pose.orientation.z
target_pose.pose.orientation.w = 1 #hole_pose.orientation.w
# Set the start state to the current state
# Set the goal pose of the end effector to the stored pose
ur5_arm.set_pose_target(target_pose, end_effector_link)
# Plan the trajectory to the goal
traj = ur5_arm.plan()
# Execute the planned trajectory
# Pause for a second
# Shut down MoveIt cleanly
# Exit MoveIt

However, my nodes fails to set the params as I have set them in my kinematics.yaml

  kinematics_solver: trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin
  kinematics_solver_timeout: 0.05
  solve_type: Manipulation1

and returns this

[ INFO] [1467410538.629341568, 298.510000000]: Looking in private handle: /move_group_commander_wrappers_1467410538042921053 for param name: ur5_arm/position_only_ik
[ INFO] [1467410538.629825732, 298.510000000]: Looking in private handle: /move_group_commander_wrappers_1467410538042921053 for param name: ur5_arm/solve_type
[ INFO] [1467410538.630190163, 298.510000000]: Using solve type Speed

Despite my launch file below including every way I can think of to set these parameters.

      <!-- Load the URDF, SRDF and other .yaml configuration files on the param server -->
      <include file="$(find husky_ur5_moveit_config)/launch/planning_context.launch">
        <arg name="load_robot_description" value="true"/>

      <node name="drill_predition" pkg="ccam_arm_nav" type="" output="screen">
        <rosparam command="load" file="$(find husky_ur5_moveit_config)/config/kinematics.yaml"/>
        <param name="arm_prefix" value="ur5_arm_"/> 
        <param name="move_group/ur5_arm/solve_type" value="Manipulation1"/>
        <param name="move_group/ur5_arm/kinematics_solver_timeout" value="0.05"/>
        <param name="ur5_arm/solve_type" value="Manipulation1"/>
        <param name="ur5_arm/kinematics_solver_timeout" value="0.05"/>
        <param name="solve_type" value="Manipulation1"/>
        <param name="kinematics_solver_timeout" value="0.05"/>
          move_group/ur5_arm/solve_type: 'Manipulation1'
          move_group/ur5_arm/kinematics_solver_timeout: 0.05
          ur5_arm/solve_type: 'Manipulation1'
          ur5_arm/kinematics_solver_timeout: 0.05
          solve_type: 'Manipulation1'
          kinematics_solver_timeout: 0.05


However, move_group.launch and moveit_rviz.launch seem to set them correctly. Accuracy rather than speed is my desire; so, I like to test out the other solver_types, such as Manipulation1 ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by CMobley7
close date 2016-07-29 16:06:34.296133

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-07 10:53:16 -0600

pbeeson gravatar image

This is an issue with the kinematics config parameters not being loaded for your actual ros node. Please see the detailed description here.

edit flag offensive delete link more

Question Tools



Asked: 2016-07-01 18:50:58 -0600

Seen: 235 times

Last updated: Jul 07 '16