ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Purpose of Forward Command Controller

asked 2021-12-16 16:57:11 -0500

swiz23 gravatar image

I recently stumbled across the forward_command_controller/ForwardCommandController ros controller while doing some research online. From the documentation, it seems that it can take multiple joints as input and simply forwards them over to the hardware interface node. But how is that different than what the position_controllers/JointGroupPositionController does for positions? Or the velocity_controllers/JointGroupVelocityController does for velocities, etc?

It seems like there is some redundancy here, and according to the controller documentation, the above controllers even use the forward command controller behind the scenes. This question applies to both ros1 and ros2.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-12-17 13:09:45 -0500

osilva gravatar image

Short answer not really:

You can see it in the source code. For position_controllers/JointGroupPositionControllerhttps://github.com/ros-controls/ros_c...

void forward_command_controller::ForwardCommandController<T>::starting(const ros::Time& time)
{
  // Start controller with current joint position
  command_buffer_.writeFromNonRT(joint_.getPosition());
}

For velocity_controllers/JointGroupVelocityController: https://github.com/ros-controls/ros_c...

void forward_command_controller::ForwardJointGroupCommandController<T>::starting(const ros::Time& time)
{
  // Start controller with 0.0 velocities
  commands_buffer_.readFromRT()->assign(n_joints_, 0.0);
}

They both make use of Forward Command Controllerclass but not doing exactly same function.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-12-16 16:57:11 -0500

Seen: 992 times

Last updated: Dec 17 '21