Skip to content

Commit

Permalink
feat(motion_velocity_planner): remove unnecessary tier4_api_msgs and …
Browse files Browse the repository at this point in the history
…tier4_v2x_msgs (#9691)

* feat(motion_velocity_planner): remove unnecessary tier4_api_msgs and tier4_v2x_msgs

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 authored Dec 19, 2024
1 parent 3abb7bc commit 6ed5634
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
#include <nav_msgs/msg/odometry.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>
#include <std_msgs/msg/header.hpp>
#include <tier4_api_msgs/msg/crosswalk_status.hpp>
#include <tier4_api_msgs/msg/intersection_status.hpp>
#include <tier4_planning_msgs/msg/velocity_limit.hpp>
#include <tier4_v2x_msgs/msg/virtual_traffic_light_state_array.hpp>

#include <lanelet2_core/Forward.h>
#include <pcl/point_cloud.h>
Expand Down Expand Up @@ -76,7 +73,6 @@ struct PlannerData
std::map<lanelet::Id, TrafficSignalStamped> traffic_light_id_map_raw_;
std::map<lanelet::Id, TrafficSignalStamped> traffic_light_id_map_last_observed_;
std::optional<tier4_planning_msgs::msg::VelocityLimit> external_velocity_limit;
tier4_v2x_msgs::msg::VirtualTrafficLightStateArray virtual_traffic_light_states;

// velocity smoother
std::shared_ptr<autoware::velocity_smoother::SmootherBase> velocity_smoother_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ This means that to stop before a wall, a stop point is inserted in the trajector

## Input topics

| Name | Type | Description |
| -------------------------------------- | ----------------------------------------------------- | ----------------------------- |
| `~/input/trajectory` | autoware_planning_msgs::msg::Trajectory | input trajectory |
| `~/input/vector_map` | autoware_map_msgs::msg::LaneletMapBin | vector map |
| `~/input/vehicle_odometry` | nav_msgs::msg::Odometry | vehicle position and velocity |
| `~/input/accel` | geometry_msgs::msg::AccelWithCovarianceStamped | vehicle acceleration |
| `~/input/dynamic_objects` | autoware_perception_msgs::msg::PredictedObjects | dynamic objects |
| `~/input/no_ground_pointcloud` | sensor_msgs::msg::PointCloud2 | obstacle pointcloud |
| `~/input/traffic_signals` | autoware_perception_msgs::msg::TrafficLightGroupArray | traffic light states |
| `~/input/virtual_traffic_light_states` | tier4_v2x_msgs::msg::VirtualTrafficLightStateArray | virtual traffic light states |
| `~/input/occupancy_grid` | nav_msgs::msg::OccupancyGrid | occupancy grid |
| Name | Type | Description |
| ------------------------------ | ----------------------------------------------------- | ----------------------------- |
| `~/input/trajectory` | autoware_planning_msgs::msg::Trajectory | input trajectory |
| `~/input/vector_map` | autoware_map_msgs::msg::LaneletMapBin | vector map |
| `~/input/vehicle_odometry` | nav_msgs::msg::Odometry | vehicle position and velocity |
| `~/input/accel` | geometry_msgs::msg::AccelWithCovarianceStamped | vehicle acceleration |
| `~/input/dynamic_objects` | autoware_perception_msgs::msg::PredictedObjects | dynamic objects |
| `~/input/no_ground_pointcloud` | sensor_msgs::msg::PointCloud2 | obstacle pointcloud |
| `~/input/traffic_signals` | autoware_perception_msgs::msg::TrafficLightGroupArray | traffic light states |
| `~/input/occupancy_grid` | nav_msgs::msg::OccupancyGrid | occupancy grid |

## Output topics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<remap from="~/input/dynamic_objects" to="/perception/object_recognition/objects"/>
<remap from="~/input/no_ground_pointcloud" to="/perception/obstacle_segmentation/pointcloud"/>
<remap from="~/input/traffic_signals" to="/perception/traffic_light_recognition/traffic_signals"/>
<remap from="~/input/virtual_traffic_light_states" to="/perception/virtual_traffic_light_states"/>
<remap from="~/input/occupancy_grid" to="/perception/occupancy_grid_map/map"/>
<remap from="~/output/trajectory" to="trajectory"/>
<!-- params -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ bool MotionVelocityPlannerNode::update_planner_data(
// optional data
const auto traffic_signals_ptr = sub_traffic_signals_.takeData();
if (traffic_signals_ptr) process_traffic_signals(traffic_signals_ptr);
const auto virtual_traffic_light_states_ptr = sub_virtual_traffic_light_states_.takeData();
if (virtual_traffic_light_states_ptr)
planner_data_.virtual_traffic_light_states = *virtual_traffic_light_states_ptr;
processing_times["update_planner_data.traffic_lights"] = sw.toc(true);

return is_ready;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ class MotionVelocityPlannerNode : public rclcpp::Node
autoware::universe_utils::InterProcessPollingSubscriber<
autoware_perception_msgs::msg::TrafficLightGroupArray>
sub_traffic_signals_{this, "~/input/traffic_signals"};
autoware::universe_utils::InterProcessPollingSubscriber<
tier4_v2x_msgs::msg::VirtualTrafficLightStateArray>
sub_virtual_traffic_light_states_{this, "~/input/virtual_traffic_light_states"};
rclcpp::Subscription<autoware_map_msgs::msg::LaneletMapBin>::SharedPtr sub_lanelet_map_;

void on_trajectory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ void publishMandatoryTopics(
test_manager->publishMap(test_target_node, "motion_velocity_planner_node/input/vector_map");
test_manager->publishTrafficSignals(
test_target_node, "motion_velocity_planner_node/input/traffic_signals");
test_manager->publishVirtualTrafficLightState(
test_target_node, "motion_velocity_planner_node/input/virtual_traffic_light_states");
test_manager->publishOccupancyGrid(
test_target_node, "motion_velocity_planner_node/input/occupancy_grid");
}
Expand Down

0 comments on commit 6ed5634

Please sign in to comment.