Skip to content

Commit fceb47b

Browse files
Add comment on idealized update rate
This better explains our hard-coded control frequency for the adapter thread.
1 parent be589e1 commit fceb47b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

joint_to_cartesian_controller/src/joint_to_cartesian_controller.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ bool JointToCartesianController::init(hardware_interface::JointStateInterface* h
156156
m_controller_adapter = std::make_unique<JointControllerAdapter>(m_joint_state_handles,nh);
157157
m_controller_manager.reset(new controller_manager::ControllerManager(m_controller_adapter.get(), nh));
158158

159-
// Process adapter callbacks even when we are not running
159+
// Process adapter callbacks even when we are not running.
160+
// This allows to interact with the adapter's controller manager without
161+
// freezes. We use an idealized update rate since we republish joint
162+
// commands as Cartesian targets. The cartesian_controllers will interpolate
163+
// these targets for the robot driver's real control rate.
160164
m_adapter_thread = std::thread([this] {
161165
constexpr int frequency = 100;
162166
auto rate = ros::Rate(frequency);

0 commit comments

Comments
 (0)