Skip to content

Commit

Permalink
changed subscriber and publisher name
Browse files Browse the repository at this point in the history
  • Loading branch information
alekskl01 committed Oct 15, 2023
1 parent c389e4e commit f81cc5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class ThrusterInterfaceROS : public rclcpp::Node {
ThrusterInterface thrusterInterface{mapping_file};

rclcpp::Subscription<vortex_msgs::msg::ThrusterForces>::SharedPtr
subscription_;
rclcpp::Publisher<vortex_msgs::msg::Pwm>::SharedPtr publisher_;
thruster_forces_sub_;
rclcpp::Publisher<vortex_msgs::msg::Pwm>::SharedPtr pwm_pub_;

public:
ThrusterInterfaceROS() : Node("thruster_interface") {
publisher_ = this->create_publisher<vortex_msgs::msg::Pwm>("pwm", 10);
subscription_ = this->create_subscription<vortex_msgs::msg::ThrusterForces>(
pwm_pub_ = this->create_publisher<vortex_msgs::msg::Pwm>("pwm", 10);
thruster_forces_sub_ = this->create_subscription<vortex_msgs::msg::ThrusterForces>(
"thrust/thruster_forces", 10,
std::bind(&ThrusterInterfaceROS::thrust_callback, this, _1));
}
Expand Down
2 changes: 1 addition & 1 deletion motion/thruster_interface/src/thruster_interface_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void ThrusterInterfaceROS::thrust_callback(
pwm_msg.pins.push_back(thruster_to_pin_map[i]);
}

publisher_->publish(pwm_msg);
pwm_pub_->publish(pwm_msg);

// thrusterInterface.publish_thrust_to_escs(forces_in_grams);
}
Expand Down

0 comments on commit f81cc5d

Please sign in to comment.