Gazebo | Ignition | Community
Ask Your Question
0

Publishing to jointTrajectoryController

asked 2017-12-19 11:11:25 -0500

Fiddle gravatar image

Hi, I've been wanting to set up my floating gripper with a controller package, like in the example here but I can't seem to find a way to publish a message, for example, for a joint gripper_dummy_prismatic_joint to move by 0.1 distance in gazebo. Below are the .yaml file for gripper control and the rostopic list output. In gazebo tutorial about connecting ros with gazebo it seems very simple, but I can't figure out how to do this with the interface written as on the ros page. I want preferably to send messages by python. I'd post this on the ROS answers, but the site seems to be down for a week now :(

.yaml

gripper:
  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: "joint_state_controller/JointStateController"
    publish_rate: 50  

  # Trajectory Controllers ---------------------------------------
  joint_trajectory_controller:
    type: "effort_controllers/JointTrajectoryController"
    joints:
     - gripper_dummy_prismatic_joint
     - gripper_dummy_revolute_joint
     - gripper_joint1
     - gripper_joint2
    gains:

       gripper_dummy_prismatic_joint: {p:  6000,  d: 1000 , i: &ki_default 1.0, i_clamp: &ki__clamp_default 2}
       gripper_dummy_revolute_joint: {p: &kp_default 8000 ,  d: &kd_default 25.0 , i: *ki_default, i_clamp: *ki__clamp_default}
       gripper_joint1: {p: *kp_default ,  d: *kd_default , i: *ki_default, i_clamp: *ki__clamp_default}
       gripper_joint2: {p: *kp_default ,  d: *kd_default , i: *ki_default, i_clamp: *ki__clamp_default}

    constraints:
       goal_time: &goal_time_constraint 40.0
       stopped_velocity_tolerance: 5.0

       gripper_dummy_prismatic_joint:
          goal: &goal_pos_constraint 0.5
          trajectory: &trajectory_pos_constraint 0.5
       gripper_dummy_revolute_joint:
          goal: *goal_pos_constraint
          trajectory: *trajectory_pos_constraint
       gripper_joint1:
          goal: *goal_pos_constraint
          trajectory: *trajectory_pos_constraint
       gripper_joint2:
          goal: *goal_pos_constraint
          trajectory: *trajectory_pos_constraint
       stop_trajectory_duration: 1.0

rostopic list:

/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/gripper/joint_states
/gripper/joint_trajectory_controller/command
/gripper/joint_trajectory_controller/follow_joint_trajectory/cancel
/gripper/joint_trajectory_controller/follow_joint_trajectory/feedback
/gripper/joint_trajectory_controller/follow_joint_trajectory/goal
/gripper/joint_trajectory_controller/follow_joint_trajectory/result
/gripper/joint_trajectory_controller/follow_joint_trajectory/status
/gripper/joint_trajectory_controller/gains/gripper_dummy_prismatic_joint/parameter_descriptions
/gripper/joint_trajectory_controller/gains/gripper_dummy_prismatic_joint/parameter_updates
/gripper/joint_trajectory_controller/gains/gripper_dummy_revolute_joint/parameter_descriptions
/gripper/joint_trajectory_controller/gains/gripper_dummy_revolute_joint/parameter_updates
/gripper/joint_trajectory_controller/gains/gripper_joint1/parameter_descriptions
/gripper/joint_trajectory_controller/gains/gripper_joint1/parameter_updates
/gripper/joint_trajectory_controller/gains/gripper_joint2/parameter_descriptions
/gripper/joint_trajectory_controller/gains/gripper_joint2/parameter_updates
/gripper/joint_trajectory_controller/state
/rosout
/rosout_agg
/tf
/tf_static
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-12-20 05:20:42 -0500

Fiddle gravatar image

I've found the answer, it was rather trivial,

allow_partial_joints_goal: true

needs to be added to the yaml file, then I can publish the messages through

rostopic pub /gripper/joint_trajectory_controller/command trajectory_msgs/JointTrajectory

then I can specify which joint I want to move.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-19 11:11:25 -0500

Seen: 3,042 times

Last updated: Dec 20 '17