Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autoware_costmap_generator): fix unusedFunction #8641

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,6 @@

namespace object_map
{
/*!
* Publishes in_gridmap using the specified in_publisher
* @param[in] in_gridmap GridMap object to publish
* @param[in] in_publisher Valid Publisher object to use
*/
void PublishGridMap(
const grid_map::GridMap & in_gridmap,
const rclcpp::Publisher<grid_map_msgs::msg::GridMap>::SharedPtr in_publisher);

/*!
* Convert and publishes a GridMap layer to a standard Ros OccupancyGrid
* @param[in] in_gridmap GridMap object to extract the layer
* @param[in] in_publisher ROS Publisher to use to publish the occupancy grid
* @param[in] in_layer Name of the layer to convert
* @param[in] in_min_value Minimum value in the layer
* @param[in] in_max_value Maximum value in the layer
*/

void PublishOccupancyGrid(
const grid_map::GridMap & in_gridmap,
const rclcpp::Publisher<nav_msgs::msg::OccupancyGrid>::SharedPtr in_publisher,
const std::string & in_layer, double in_min_value, double in_max_value, double in_height);

/*!
* Projects the in_area_points forming the road, stores the result in out_grid_map.
* @param[out] out_grid_map GridMap object to add the road grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,7 @@
#include <vector>

namespace object_map
{

Check notice on line 39 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/object_map_utils.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Excess Number of Function Arguments

PublishOccupancyGrid is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
void PublishGridMap(
const grid_map::GridMap & in_gridmap,
const rclcpp::Publisher<grid_map_msgs::msg::GridMap>::SharedPtr in_publisher)
{
auto message = grid_map::GridMapRosConverter::toMessage(in_gridmap);
in_publisher->publish(*message);
}

void PublishOccupancyGrid(
const grid_map::GridMap & in_gridmap,
const rclcpp::Publisher<nav_msgs::msg::OccupancyGrid>::SharedPtr in_publisher,
const std::string & in_layer, double in_min_value, double in_max_value, double in_height)
{
nav_msgs::msg::OccupancyGrid message;
grid_map::GridMapRosConverter::toOccupancyGrid(
in_gridmap, in_layer, in_min_value, in_max_value, message);
message.info.origin.position.z = in_height;
in_publisher->publish(message);
}

void FillPolygonAreas(
grid_map::GridMap & out_grid_map,
Expand Down
Loading