Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 21, 2024
1 parent ae041f9 commit 5d693bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tools/reaction_analyzer/include/reaction_analyzer_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <motion_utils/trajectory/trajectory.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rosbag2_cpp/reader.hpp>
#include <tier4_autoware_utils/geometry/geometry.hpp>
#include <tier4_autoware_utils/math/unit_conversion.hpp>

Expand All @@ -36,7 +37,6 @@
#include <pcl_conversions/pcl_conversions.h>
#include <tf2_ros/buffer.h>
#include <tf2_ros/transform_listener.h>
#include <rosbag2_cpp/reader.hpp>

#include <memory>
#include <mutex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<node_container pkg="rclcpp_components" exec="component_container_mt" name="reaction_analyzer_container" namespace="" args="" output="screen">
<composable_node pkg="reaction_analyzer" plugin="reaction_analyzer::ReactionAnalyzerNode" name="reaction_analyzer" namespace="">
<param from="$(var reaction_analyzer_param_path)"/>
<!-- <remap from="output/points_raw" to="/perception/obstacle_segmentation/pointcloud"/>-->
<!-- <remap from="output/points_raw" to="/perception/obstacle_segmentation/pointcloud"/>-->
<remap from="output/objects" to="/perception/object_recognition/objects"/>
<remap from="output/initialpose" to="/initialpose"/>
<remap from="output/goal" to="/planning/mission_planning/goal"/>
Expand Down
4 changes: 2 additions & 2 deletions tools/reaction_analyzer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
<depend>eigen</depend>
<depend>libpcl-all-dev</depend>
<depend>motion_utils</depend>
<depend>rosbag2_cpp</depend>
<depend>pcl_conversions</depend>
<depend>pcl_ros</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>rosbag2_cpp</depend>
<depend>sensor_msgs</depend>
<depend>tf2</depend>
<depend>tf2_ros</depend>
<depend>tf2_eigen</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_ros</depend>
<depend>tier4_autoware_utils</depend>

<test_depend>ament_cmake_ros</test_depend>
Expand Down
6 changes: 2 additions & 4 deletions tools/reaction_analyzer/src/reaction_analyzer_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ void ReactionAnalyzerNode::pointcloud2OutputCallback(
mutex_.lock();
auto variant = message_buffers_[node_name];
const auto current_odometry_ptr = odometry_;
// const auto is_spawned = spawn_cmd_time_;
// const auto is_spawned = spawn_cmd_time_;
mutex_.unlock();
if (!current_odometry_ptr) return;


if (!std::holds_alternative<PointCloud2Buffer>(variant)) {
// If the variant doesn't hold a Trajectory message yet, initialize it
PointCloud2Buffer buffer(std::nullopt);
Expand Down Expand Up @@ -171,7 +170,6 @@ void ReactionAnalyzerNode::predictedObjectsOutputCallback(
if (searchPredictedObjectsNearEntity(*msg_ptr)) {
std::get<PredictedObjectsBuffer>(variant) = *msg_ptr;
std::cout << "Reacted " << node_name << std::endl;

}
// if (!is_spawned) return;
mutex_.lock();
Expand Down Expand Up @@ -465,7 +463,7 @@ void ReactionAnalyzerNode::onTimer()
*msg_cloud_pub = *msg_cloud_with_obj_;
msg_cloud_pub->header.stamp = this->now();
pub_pointcloud_->publish(std::move(msg_cloud_pub));
} else{
} else {
std::unique_ptr<PointCloud2> msg_cloud_pub = std::make_unique<PointCloud2>();
*msg_cloud_pub = *msg_cloud_empty_;
msg_cloud_pub->header.stamp = this->now();
Expand Down

0 comments on commit 5d693bc

Please sign in to comment.