Skip to content

Commit

Permalink
colcon complies!
Browse files Browse the repository at this point in the history
  • Loading branch information
danialramzan committed Aug 7, 2024
1 parent 2e042b3 commit db5c2a2
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions src/triton_gazebo/src/underwater_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,54 @@ namespace triton_gazebo
{

UnderwaterCamera::UnderwaterCamera(const rclcpp::NodeOptions & options)
: Node("underwater_camera", options)
: Node("underwater_camera", options)
{

rmw_qos_profile_t subscriber_qos_profile = rmw_qos_profile_sensor_data;
rmw_qos_profile_t publisher_qos_profile = rmw_qos_profile_default;

underwater_image_pub_ = image_transport::create_publisher(this,
"front_camera/underwater/image_raw",
underwater_image_pub_ = image_transport::create_publisher(this,
"front_camera/underwater/image_raw",
publisher_qos_profile);

image_pub_ = image_transport::create_publisher(this,
"repub/image_raw",
image_pub_ = image_transport::create_publisher(this,
"repub/image_raw",
publisher_qos_profile);

depth_pub_ = image_transport::create_publisher(this,
"repub/depth/image_raw",
depth_pub_ = image_transport::create_publisher(this,
"repub/depth/image_raw",
publisher_qos_profile);

image_sub_.subscribe(this,
"front_camera/image_raw",
"front_camera/image_raw",
"raw",
subscriber_qos_profile);

depth_sub_.subscribe(this,
"front_camera/depth/image_raw",
"front_camera/depth/image_raw",
"raw",
subscriber_qos_profile);

approx_sync_ = std::make_shared<ApproxSync>(
ApproxPolicy(5),
image_sub_,
image_sub_,
depth_sub_);

approx_sync_->registerCallback(
std::bind(&UnderwaterCamera::syncCallback, this, _1, _2));

this->declare_parameter("rho");
this->declare_parameter("irradiance_transmission");
this->declare_parameter("spectral_sensitivity_blue");
this->declare_parameter("spectral_sensitivity_red");
this->declare_parameter("spectral_sensitivity_green");
this->declare_parameter("illumination_irradiance");
// this->declare_parameter("rho");
// this->declare_parameter("irradiance_transmission");
// this->declare_parameter("spectral_sensitivity_blue");
// this->declare_parameter("spectral_sensitivity_red");
// this->declare_parameter("spectral_sensitivity_green");
// this->declare_parameter("illumination_irradiance");
this->declare_parameter<std::vector<double>>("rho", std::vector<double>{0.0});
this->declare_parameter<std::vector<double>>("irradiance_transmission", std::vector<double>{0.0});
this->declare_parameter<std::vector<double>>("spectral_sensitivity_blue", std::vector<double>{0.0});
this->declare_parameter<std::vector<double>>("spectral_sensitivity_red", std::vector<double>{0.0});
this->declare_parameter<std::vector<double>>("spectral_sensitivity_green", std::vector<double>{0.0});
this->declare_parameter<std::vector<double>>("illumination_irradiance", std::vector<double>{0.0});

std::vector<double> rho_vals;
std::vector<double> Beta_vals;
Expand Down

0 comments on commit db5c2a2

Please sign in to comment.