| 130 | } |
| 131 | |
| 132 | void Odometry::joint_state_callback(const sensor_msgs::msg::JointState::SharedPtr joint_state_msg) |
| 133 | { |
| 134 | const rclcpp::Time current_time = joint_state_msg->header.stamp; |
| 135 | static rclcpp::Time last_time = current_time; |
| 136 | const rclcpp::Duration duration = current_time - last_time; |
| 137 | |
| 138 | update_joint_state(joint_state_msg); |
| 139 | calculate_odometry(duration); |
| 140 | publish(current_time); |
| 141 | |
| 142 | last_time = current_time; |
| 143 | } |
| 144 | |
| 145 | void Odometry::joint_state_and_imu_callback( |
| 146 | const std::shared_ptr<sensor_msgs::msg::JointState const> & joint_state_msg, |
nothing calls this directly
no outgoing calls
no test coverage detected