Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Clang Robot committed Aug 8, 2024
1 parent 70b32a1 commit 5fb44bc
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 149 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef COLLISION_AVOIDANCE_TASK_ROS_HPP
#define COLLISION_AVOIDANCE_TASK_ROS_HPP

#include <geometry_msgs/msg/twist_stamped.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include <njord_task_base/njord_task_base_ros.hpp>
#include <pcl/PointIndices.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl_conversions/pcl_conversions.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp> // Required for tf2::doTransform
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp> // Required for tf2::doTransform

namespace collision_avoidance_task {

Expand All @@ -30,7 +30,7 @@ class CollisionAvoidanceTaskNode : public NjordTaskBaseNode {

/**
* @brief Predict the positions of the first two buoys
*
*
* @return Eigen::Array<double, 2, 2> predicted_positions
*/
Eigen::Array<double, 2, 2> predict_first_buoy_pair();
Expand All @@ -39,33 +39,33 @@ class CollisionAvoidanceTaskNode : public NjordTaskBaseNode {
predict_second_buoy_pair(const geometry_msgs::msg::Point &buoy_0,
const geometry_msgs::msg::Point &buoy_1);

void track_vessel(const Eigen::Vector2d& direction_vector_downwards,
const Eigen::Vector2d& direction_vector_forwards,
const geometry_msgs::msg::Point& waypoint_second_buoy_pair);
void track_vessel(const Eigen::Vector2d &direction_vector_downwards,
const Eigen::Vector2d &direction_vector_forwards,
const geometry_msgs::msg::Point &waypoint_second_buoy_pair);

nav_msgs::msg::Odometry get_vessel_odom();

LandmarkOdomID filter_landmarks(
const vortex_msgs::msg::LandmarkArray &landmarks,
const Eigen::Vector2d& direction_vector_downwards,
const Eigen::Vector2d& direction_vector_forwards,
const geometry_msgs::msg::Point& waypoint_second_buoy_pair);
LandmarkOdomID
filter_landmarks(const vortex_msgs::msg::LandmarkArray &landmarks,
const Eigen::Vector2d &direction_vector_downwards,
const Eigen::Vector2d &direction_vector_forwards,
const geometry_msgs::msg::Point &waypoint_second_buoy_pair);

void vessel_collision_heading();

double calculate_angle(const geometry_msgs::msg::Vector3& twist1, const geometry_msgs::msg::Vector3& twist2);
double calculate_angle(const geometry_msgs::msg::Vector3 &twist1,
const geometry_msgs::msg::Vector3 &twist2);

bool has_vessel_passed_freya(const Eigen::Vector2d& direction_vector_downwards);
bool
has_vessel_passed_freya(const Eigen::Vector2d &direction_vector_downwards);

Eigen::Array<double, 2, 2>
predict_third_buoy_pair(const geometry_msgs::msg::Point &buoy_0,
const geometry_msgs::msg::Point &buoy_1);
const geometry_msgs::msg::Point &buoy_1);

Eigen::Array<double, 2, 2>
predict_fourth_buoy_pair(const geometry_msgs::msg::Point &buoy_red,
const geometry_msgs::msg::Point &buoy_green);


const geometry_msgs::msg::Point &buoy_green);

private:
mutable std::mutex vessel_odom_mutex_;
Expand Down
Loading

0 comments on commit 5fb44bc

Please sign in to comment.