|
@@ -47,6 +47,13 @@ void SaturnController::init() {
|
|
(int)(1e9 / config_handler_->imu_timer_frequency_)),
|
|
(int)(1e9 / config_handler_->imu_timer_frequency_)),
|
|
std::bind(&SaturnController::imuTimerCallback, this), imu_timer_cbg_);
|
|
std::bind(&SaturnController::imuTimerCallback, this), imu_timer_cbg_);
|
|
|
|
|
|
|
|
+ joint_state_timer_cbg_ = node_->create_callback_group(
|
|
|
|
+ rclcpp::CallbackGroupType::MutuallyExclusive);
|
|
|
|
+
|
|
|
|
+ joint_state_timer_ = node_->create_wall_timer(
|
|
|
|
+ std::chrono::nanoseconds(
|
|
|
|
+ (int)(1e9 / config_handler_->joints_state_timer_frequency_)),
|
|
|
|
+ std::bind(&SaturnController::publishJointState, this), joint_state_timer_cbg_);
|
|
// subscription
|
|
// subscription
|
|
cmd_vel_callback_cg_ = node_->create_callback_group(
|
|
cmd_vel_callback_cg_ = node_->create_callback_group(
|
|
rclcpp::CallbackGroupType::MutuallyExclusive);
|
|
rclcpp::CallbackGroupType::MutuallyExclusive);
|
|
@@ -374,7 +381,6 @@ void SaturnController::mainTimerCallback() {
|
|
publishChargingState();
|
|
publishChargingState();
|
|
publishRobotMode();
|
|
publishRobotMode();
|
|
publishLeggedOdom();
|
|
publishLeggedOdom();
|
|
- publishJointState();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
void SaturnController::imuTimerCallback() {
|
|
void SaturnController::imuTimerCallback() {
|