Controlling the same joint with two different controller types
I want to move a joint with force so I am using a JointEffortController but want to return the radian position of the joint. This is my yaml file rrbot:
Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
# Position Controllers ---------------------------------------
joint1_effort_controller:
type: effort_controllers/JointEffortController
joint: joint1
pid: {p: 1, i: 0.001, d: 0.065}
joint2_effort_controller:
type: effort_controllers/JointEffortController
joint: joint2
pid: {p: 1, i: 0.001, d: 0.065}
joint1_position_controller:
type: effort_controllers/JointPositionController
joint: joint1
pid: {p: 100.0, i: 0.01, d: 10.0}
joint2_position_controller:
type: effort_controllers/JointPositionController
joint: joint2
pid: {p: 100.0, i: 0.01, d: 10.0}
When I type rostopic list into the terminal it only returns JointPositionController How can I return the JointEffortController aswell?
joint state is published by the
joint_state_controller/JointStateController
, which you already have in your configuration.It's not clear to me what you are asking.
rostopic list
shows the currently active topics. It doesn't know anything about controllers.Could you clarify?
@gvdhoorn this is my rostopic list / clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg
/rrbot/camera1/image_raw/compressed
/rrbot/camera1/image_raw/compressed/parameter_descriptions
/rrbot/camera1/image_raw/compressed/parameter_updates
/rrbot/camera1/image_raw/compressedDepth
/rrbot/camera1/image_raw/compressedDepth/parameter_descriptions
/rrbot/camera1/image_raw/compressedDepth/parameter_updates
/rrbot/camera1/image_raw/theora
/rrbot/camera1/image_raw/theora/parameter_descriptions
/rrbot/camera1/image_raw/theora/parameter_updates
/rrbot/camera1/parameter_descriptions
/rrbot/camera1/parameter_updates
/rrbot/joint1_position_controller/command
/rrbot/joint2_position_controller/command /rrbot/joint_states /rrbot/laser/scan /tf /tf_static
I am able to give torque commands to the joint but also want the position in radians after I give the torque com
I don't understand your comment.
You already have the joint state controller in your controller configuration.
What is it you're missing?
@gvdhoorn I have a python script and I would like to publish the joint state to the terminal, how can I do this. I tried rospy.Publisher('/rrbot/joint_state_controller/JointStateController', Float64, queue_size=10) but its not publishing.
No, that's not how this works I believe.
Perhaps there is some confusion about what the
joint_state_controller
actually does. See #q303358.If you have it loaded, you should already have "the position in radians".