diff --git a/include/tachimawari/joint/tf2/frame.hpp b/include/tachimawari/joint/tf2/frame.hpp index 7e5e900..685edbe 100644 --- a/include/tachimawari/joint/tf2/frame.hpp +++ b/include/tachimawari/joint/tf2/frame.hpp @@ -54,7 +54,7 @@ class Frame double translation_y; double translation_z; - double quaternion_x; // maybe change to keisan angle + double quaternion_x; double quaternion_y; double quaternion_z; double quaternion_w; diff --git a/include/tachimawari/joint/tf2/frame_id.hpp b/include/tachimawari/joint/tf2/frame_id.hpp index 43029b7..813c5e1 100644 --- a/include/tachimawari/joint/tf2/frame_id.hpp +++ b/include/tachimawari/joint/tf2/frame_id.hpp @@ -55,4 +55,4 @@ class FrameId } // namespace tachimawari::joint -#endif // TACHIMAWARI__JOINT_TF2__FRAME_ID_HPP_ \ No newline at end of file +#endif // TACHIMAWARI__JOINT_TF2__FRAME_ID_HPP_ diff --git a/src/tachimawari/joint/node/joint_node.cpp b/src/tachimawari/joint/node/joint_node.cpp index 516f694..cb7090f 100644 --- a/src/tachimawari/joint/node/joint_node.cpp +++ b/src/tachimawari/joint/node/joint_node.cpp @@ -34,17 +34,17 @@ namespace tachimawari::joint { -std::string JointNode::get_node_prefix() { return "joint"; } +std::string JointNode::get_node_prefix() {return "joint";} -std::string JointNode::control_joints_topic() { return get_node_prefix() + "/control_joints"; } +std::string JointNode::control_joints_topic() {return get_node_prefix() + "/control_joints";} -std::string JointNode::set_joints_topic() { return get_node_prefix() + "/set_joints"; } +std::string JointNode::set_joints_topic() {return get_node_prefix() + "/set_joints";} -std::string JointNode::set_torques_topic() { return get_node_prefix() + "/set_torques"; } +std::string JointNode::set_torques_topic() {return get_node_prefix() + "/set_torques";} -std::string JointNode::status_topic() { return "measurement/status"; } +std::string JointNode::status_topic() {return "measurement/status";} -std::string JointNode::current_joints_topic() { return get_node_prefix() + "/current_joints"; } +std::string JointNode::current_joints_topic() {return get_node_prefix() + "/current_joints";} JointNode::JointNode( rclcpp::Node::SharedPtr node, std::shared_ptr joint_manager, std::string path) @@ -74,7 +74,7 @@ JointNode::JointNode( std::vector joints; std::transform( message->ids.begin(), message->ids.end(), std::back_inserter(joints), - [](uint8_t id) -> Joint { return Joint(id, 0); }); + [](uint8_t id) -> Joint {return Joint(id, 0);}); this->joint_manager->torque_enable(joints, message->torque_enable); }); @@ -87,7 +87,7 @@ JointNode::JointNode( current_joints_publisher = node->create_publisher(current_joints_topic(), 10); } -void JointNode::update() { middleware.update(); } +void JointNode::update() {middleware.update();} void JointNode::publish_current_joints() { diff --git a/src/tachimawari/node/tachimawari_node.cpp b/src/tachimawari/node/tachimawari_node.cpp index c08adb2..5e162b0 100644 --- a/src/tachimawari/node/tachimawari_node.cpp +++ b/src/tachimawari/node/tachimawari_node.cpp @@ -44,26 +44,27 @@ TachimawariNode::TachimawariNode( imu_node(nullptr), control_node(nullptr) { - node_timer = node->create_wall_timer(8ms, [this]() { - if (this->control_manager) { - this->control_manager->add_default_bulk_read_packet(); - this->control_manager->send_bulk_read_packet(); + node_timer = node->create_wall_timer( + 8ms, [this]() { + if (this->control_manager) { + this->control_manager->add_default_bulk_read_packet(); + this->control_manager->send_bulk_read_packet(); - if (this->imu_node) { - this->imu_node->update(); - } + if (this->imu_node) { + this->imu_node->update(); + } - if (this->control_node) { - this->control_node->update(); - } + if (this->control_node) { + this->control_node->update(); + } - if (this->joint_node) { - this->joint_node->update(); + if (this->joint_node) { + this->joint_node->update(); - this->joint_node->publish_current_joints(); - this->joint_node->publish_frame_tree(); + this->joint_node->publish_current_joints(); + this->joint_node->publish_frame_tree(); + } } - } }); }