Skip to content

Commit

Permalink
fixed saturate_vector_values bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldokan committed Apr 8, 2024
1 parent f107122 commit 0377659
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ inline Eigen::MatrixXd calculate_right_pseudoinverse(const Eigen::MatrixXd &T) {
* @return True if all vector values are within the given range, false
* otherwise.
*/
inline bool saturate_vector_values(Eigen::Vector3d &vec, double min,
inline bool saturate_vector_values(Eigen::VectorXd &vec, double min,
double max) {
bool all_values_in_range =
std::all_of(vec.begin(), vec.end(),
Expand Down
5 changes: 2 additions & 3 deletions motion/thruster_allocator/src/allocator_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ ThrusterAllocator::ThrusterAllocator()
std::bind(&ThrusterAllocator::wrench_callback, this,
std::placeholders::_1));

thruster_forces_publisher_ =
this->create_publisher<std_msgs::msg::Float32MultiArray>(
"thrust/thruster_forces", 1);
thruster_forces_publisher_ = this->create_publisher<std_msgs::msg::Float32MultiArray>(
"thrust/thruster_forces", 1);

calculate_thrust_timer_ = this->create_wall_timer(
100ms, std::bind(&ThrusterAllocator::calculate_thrust_timer_cb, this));
Expand Down

0 comments on commit 0377659

Please sign in to comment.