Skip to content

Commit

Permalink
Merge branch 'thrust_allocation_ROS2' of github.com:vortexntnu/vortex…
Browse files Browse the repository at this point in the history
…-asv into thrust_allocation_ROS2
  • Loading branch information
Mokaz committed Nov 5, 2023
2 parents 01f0fa5 + 3859208 commit e12497e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/**
* @file pseudoinverse_allocator.hpp
* @brief Contains the PseudoinverseAllocator class, which implements the unweighted pseudoinverse-based allocator described in e.g. Fossen 2011 Handbook of Marine Craft Hydrodynamics and Motion Control (chapter 12.3.2).
* @brief Contains the PseudoinverseAllocator class, which implements the
* unweighted pseudoinverse-based allocator described in e.g. Fossen 2011
* Handbook of Marine Craft Hydrodynamics and Motion Control (chapter 12.3.2).
*/

#ifndef VORTEX_ALLOCATOR_PSEUDOINVERSE_ALLOCATOR_HPP
Expand All @@ -9,7 +11,8 @@
#include <eigen3/Eigen/Eigen>

/**
* @brief The PseudoinverseAllocator class calculates the allocated thrust given the input torques using the pseudoinverse allocator.
* @brief The PseudoinverseAllocator class calculates the allocated thrust given
* the input torques using the pseudoinverse allocator.
*/
class PseudoinverseAllocator {
public:
Expand All @@ -21,7 +24,8 @@ class PseudoinverseAllocator {
explicit PseudoinverseAllocator(const Eigen::MatrixXd &T_pinv);

/**
* @brief Calculates the allocated thrust given the input torques using the pseudoinverse allocator.
* @brief Calculates the allocated thrust given the input torques using the
* pseudoinverse allocator.
*
* @param tau The input torques as a vector.
* @return The allocated thrust as a vector.
Expand Down
3 changes: 2 additions & 1 deletion motion/thruster_allocator/src/allocator_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ ThrusterAllocator::ThrusterAllocator()
declare_parameter("propulsion.thrusters.min", -100);
declare_parameter("propulsion.thrusters.max", 100);
declare_parameter("propulsion.thrusters.direction", std::vector<int64_t>{0});
declare_parameter("propulsion.thrusters.configuration_matrix", std::vector<double>{0});
declare_parameter("propulsion.thrusters.configuration_matrix",
std::vector<double>{0});

num_dof_ = get_parameter("propulsion.dofs.num").as_int();
num_thrusters_ = get_parameter("propulsion.thrusters.num").as_int();
Expand Down

0 comments on commit e12497e

Please sign in to comment.