29#include <sas_core/sas_robot_driver.hpp>
30#include <rclcpp/rclcpp.hpp>
31#include <mavros_msgs/msg/override_rc_in.hpp>
32#include <realtime_tools/realtime_publisher.hpp>
84class RobotDriverBrov2 :
public RobotDriver
91 std::unique_ptr<Impl> impl_;
95 RobotDriverBrov2(
const RobotDriverBrov2&) =
delete;
96 RobotDriverBrov2() =
delete;
105 const std::shared_ptr<marinholab::sas::core::ShutdownSignaler>& shutdown_signaler);
Definition sas_robot_driver_brov2.cpp:36
void disconnect() override
Release the ROS resources created in connect().
Definition sas_robot_driver_brov2.cpp:362
Eigen::VectorXd get_joint_torques() override
Get the last commanded wrench.
Definition sas_robot_driver_brov2.cpp:99
void initialize() override
Configure the autopilot servo parameters and send neutral commands.
Definition sas_robot_driver_brov2.cpp:231
Eigen::VectorXd get_joint_positions() override
Get the last commanded PWM vector (there is no sensor feedback).
Definition sas_robot_driver_brov2.cpp:75
void deinitialize() override
Return the thrusters to neutral.
Definition sas_robot_driver_brov2.cpp:327
void set_target_joint_torques(const Eigen::VectorXd &tau) override
Command a 6D wrench, which is allocated to the thrusters and sent as PWM.
Definition sas_robot_driver_brov2.cpp:121
void connect() override
Create the ROS node and the RC override publisher.
Definition sas_robot_driver_brov2.cpp:178
void set_target_joint_positions(const Eigen::VectorXd &q) override
Not supported.
Definition sas_robot_driver_brov2.cpp:87
Configuration of the RobotDriverBrov2.
Definition sas_robot_driver_brov2.hpp:64
std::string param_service_name
MAVROS parameter service.
Definition sas_robot_driver_brov2.hpp:71
std::string sim_batt_voltage_param
Simulated battery voltage parameter.
Definition sas_robot_driver_brov2.hpp:72
Eigen::MatrixXd B
Thruster allocation matrix (6 x number of thrusters).
Definition sas_robot_driver_brov2.hpp:76
double v_bus
Bus (battery) voltage.
Definition sas_robot_driver_brov2.hpp:74
std::string rc_override_topic
Topic the RC override is published to.
Definition sas_robot_driver_brov2.hpp:69
std::vector< double > rev_thrust_curve_coeffs
Reverse thrust curve coefficients.
Definition sas_robot_driver_brov2.hpp:67
std::vector< double > fwd_thrust_curve_coeffs
Forward thrust curve coefficients.
Definition sas_robot_driver_brov2.hpp:66
std::vector< ThrusterConfig > thruster_configs
One ThrusterConfig per thruster.
Definition sas_robot_driver_brov2.hpp:65
std::string node_name_prefix
Prefix of the internal node name.
Definition sas_robot_driver_brov2.hpp:70
Configuration of a single thruster.
Definition sas_robot_driver_brov2.hpp:46
double min_pwm
Min allowed PWM.
Definition sas_robot_driver_brov2.hpp:53
std::string servo_function_param
Autopilot parameter name, e.g. "SERVO1_FUNCTION".
Definition sas_robot_driver_brov2.hpp:57
double f_max
Max allowed thruster force.
Definition sas_robot_driver_brov2.hpp:52
double f_min
Min allowed thruster force.
Definition sas_robot_driver_brov2.hpp:51
int servo_function_values
Servo function value (1 is passthrough mode).
Definition sas_robot_driver_brov2.hpp:49
double max_pwm
Max allowed PWM.
Definition sas_robot_driver_brov2.hpp:54
int channel
RC channel index (1-based).
Definition sas_robot_driver_brov2.hpp:47
double deadband_pwm
PWM deadband.
Definition sas_robot_driver_brov2.hpp:55
int neutral_pwm
PWM to send when stopped.
Definition sas_robot_driver_brov2.hpp:48