Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/dvl_a50/dvl_a50.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DvlA50
int speed_of_sound,
bool acoustic_enabled,
bool led_enabled,
int mountig_rotation_offset,
int mounting_rotation_offset,
std::string range_mode);

void set_speed_of_sound(int speed_of_sound);
Expand Down
13 changes: 9 additions & 4 deletions src/dvl_a50_ros2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,19 @@ class DvlA50Node : public rclcpp_lifecycle::LifecycleNode
velocity_report.beam_ranges_valid = true;
velocity_report.beam_velocities_valid = res["velocity_valid"];

velocity_report.num_good_beams = 0;
// Beam specific data
for (size_t beam = 0; beam < 4; beam++)
{
velocity_report.num_good_beams += bool(res["transducers"][beam]["beam_valid"]);
velocity_report.range = res["transducers"][beam]["distance"];
if (res["transducers"][beam]["beam_valid"])
{
velocity_report.num_good_beams++;
}

velocity_report.range[beam] = double(res["transducers"][beam]["distance"]);
//velocity_report.range_covar
velocity_report.beam_quality = res["transducers"][beam]["rssi"];
velocity_report.beam_velocity = res["transducers"][beam]["velocity"];
velocity_report.beam_quality[beam] = res["transducers"][beam]["rssi"];
velocity_report.beam_velocity[beam] = res["transducers"][beam]["velocity"];
//velocity_report.beam_velocity_covar
}

Expand Down