Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5fffe48
Modified values for teb
matthewhannay567 Jan 23, 2022
beb6be6
Split teb parameters into two files
matthewhannay567 Jan 23, 2022
2f1bcd7
Fixed footprint in costmap_params
matthewhannay567 Jan 24, 2022
10a4762
Split global and local costmap params
matthewhannay567 Jan 24, 2022
c6e9d8a
Fixed nav_sim not using swerve drive
matthewhannay567 Jan 27, 2022
ee5e0ad
Merge branch 'master' into feat/holonomic_teb
matthewhannay567 Jan 27, 2022
8e949a5
Tuned TEB params
matthewhannay567 Jan 30, 2022
f283bf7
Removed Jessiii files
matthewhannay567 Feb 6, 2022
7351b01
Merge branch 'master' into feat/holonomic_teb
matthewhannay567 Feb 20, 2022
7ccb082
Fixed issues
matthewhannay567 Feb 20, 2022
ea92071
Modified config. need to work on magnetometer
matthewhannay567 Feb 24, 2022
32f7bb2
Changed IMU yaw offsets to zero
VAM7686 Feb 27, 2022
602ec43
updated navsat yaw offset to match updated simulated IMU yaw values
VAM7686 Feb 27, 2022
5d33856
updated control_config because commands can also specify vy
VAM7686 Feb 27, 2022
e0f4452
adding back velocity pair so build passes
VAM7686 Feb 27, 2022
1599622
add velocity pair back to cmake
VAM7686 Feb 27, 2022
dcba1bc
minor localization changes
VAM7686 Feb 27, 2022
669553d
Fixed issues with swerve wheel odometery
VAM7686 Mar 10, 2022
bbb8ddb
elevated swervi and tuned PID variables so swervi is able to go over …
VAM7686 Mar 10, 2022
17fab1d
increased acceleration in TEB
VAM7686 Mar 10, 2022
1390944
Configured robot_localization for 3D localization
VAM7686 Mar 10, 2022
94d8173
removed all jessi stuff
VAM7686 Mar 10, 2022
af1cf4f
formatted
VAM7686 Mar 10, 2022
294ec57
Added masking for slope/traversability layer
matthewhannay567 Apr 7, 2022
3e60f53
Merge branch 'feat/holonomic_teb' into fix/traversability_ghost_obsta…
matthewhannay567 Apr 7, 2022
49ee831
first pass
matthewhannay567 Apr 7, 2022
97e3118
second pass
matthewhannay567 Apr 10, 2022
2979ffc
third pass
matthewhannay567 Apr 10, 2022
4e94f8f
Merge branch 'fix/remove_model_choices' into feat/holonomic_teb
matthewhannay567 Apr 10, 2022
0bdf40e
Merge branch 'feat/holonomic_teb' into fix/traversability_ghost_obsta…
matthewhannay567 Apr 10, 2022
37e474a
Merge branch 'master' into fix/traversability_ghost_obstacles
VAM7686 May 31, 2022
d4628c5
fixed build issues
VAM7686 May 31, 2022
6812fbd
formatting
VAM7686 May 31, 2022
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
1 change: 0 additions & 1 deletion igvc_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ add_message_files(
velocity_quad.msg
velocity_pair.msg
lights.msg
action_path.msg
system_stats.msg
map.msg
igvc_path.msg
Expand Down
2 changes: 1 addition & 1 deletion igvc_navigation/src/mapper/traversability_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void TraversabilityLayer::slopeMapCallback(const grid_map_msgs::GridMap &slope_m
{
grid_map::Position pos;
slope_map.getPosition((*it), pos);
if (map_.isInside(pos))
if (map_.isInside(pos) && slope_map.get("mask_dilated")((*it)[0], (*it)[1]) > 0)
{
float slope = slope_map.get("slope")((*it)[0], (*it)[1]);
grid_map::Index map_index;
Expand Down
1 change: 1 addition & 0 deletions igvc_perception/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ find_package(catkin REQUIRED COMPONENTS
grid_map_core
grid_map_ros
grid_map_msgs
grid_map_cv
)

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand Down
2 changes: 1 addition & 1 deletion igvc_perception/config/elevation_mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ min_variance: 0.000009
max_variance: 0.01
mahalanobis_distance_threshold: 2.5
multi_height_noise: 0.0000009
fused_map_publishing_rate: 0
fused_map_publishing_rate: 1.0
enable_visibility_cleanup: false

# SENSOR PARAMETERS
Expand Down
13 changes: 8 additions & 5 deletions igvc_perception/config/slope_filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ slope_map_filters:
type: gridMapFilters/BufferNormalizerFilter

# Delete unneeded layers.
- name: delete_original_layers
type: gridMapFilters/DeletionFilter
params:
layers: [horizontal_variance_x, horizontal_variance_y, horizontal_variance_xy,
color, time, standard_deviation, horizontal_standard_deviation, two_sigma_bound] # List of layers.
# - name: delete_original_layers
# type: gridMapFilters/DeletionFilter
# params:
# layers: [horizontal_variance_x, horizontal_variance_y, horizontal_variance_xy,
# color, time, standard_deviation, horizontal_standard_deviation, two_sigma_bound] # List of layers.

# Boxblur as an alternative to the inpaint and radial blurring filter above.
- name: boxblur
Expand Down Expand Up @@ -36,3 +36,6 @@ slope_map_filters:
params:
output_layer: slope
expression: acos(normal_vectors_z)

erode_radius: 7
dilate_radius: 6
1 change: 1 addition & 0 deletions igvc_perception/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<depend>grid_map_core</depend>
<depend>grid_map_ros</depend>
<depend>grid_map_msgs</depend>
<depend>grid_map_cv</depend>

<build_depend>image_transport</build_depend>
<build_depend>cv_bridge</build_depend>
Expand Down
33 changes: 28 additions & 5 deletions igvc_perception/src/slope_filter/slope_filter.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#include "slope_filter.h"
#include <grid_map_ros/GridMapRosConverter.hpp>
#include <parameter_assertions/assertions.h>
#include <grid_map_cv/grid_map_cv.hpp>

TraversabilityFilter::TraversabilityFilter() : filter_chain_("grid_map::GridMap")
{
ROS_INFO_STREAM("RAW INFO RECEIVED");
private_nh_ = ros::NodeHandle("~");
elevation_map_sub_ = private_nh_.subscribe("/elevation_mapping/elevation_map_raw", 1,
&TraversabilityFilter::elevationMapCallback, this);
elevation_map_sub_ =
private_nh_.subscribe("/elevation_mapping/elevation_map", 1, &TraversabilityFilter::elevationMapCallback, this);
traversability_map_pub_ = private_nh_.advertise<grid_map_msgs::GridMap>("/slope/gridmap", 1);

assertions::getParam(private_nh_, "erode_radius", erode_radius);
assertions::getParam(private_nh_, "dilate_radius", dilate_radius);

// setup filter chain
if (!filter_chain_.configure("/slope_filter/slope_map_filters", private_nh_))
{
Expand All @@ -21,15 +27,32 @@ void TraversabilityFilter::elevationMapCallback(const grid_map_msgs::GridMap& me
grid_map::GridMap input_map;
grid_map::GridMapRosConverter::fromMessage(message, input_map);

grid_map::GridMap output_map;
if (!filter_chain_.update(input_map, output_map))
grid_map::GridMap slope_map;
if (!filter_chain_.update(input_map, slope_map))
{
ROS_ERROR_STREAM("Could not update the grid map filter chain!");
return;
}

cv::Mat elevation_data_mask;
grid_map::GridMapCvConverter::toImage<cv::uint8_t, 1>(input_map, "elevation", CV_8U, -1.0, 0.0, elevation_data_mask);
grid_map::GridMapCvConverter::addLayerFromImage<cv::uint8_t, 1>(elevation_data_mask, "mask_original", slope_map, 0,
255, 0);

cv::erode(elevation_data_mask, elevation_data_mask,
cv::getStructuringElement(cv::MORPH_RECT, cv::Size(2 * erode_radius + 1, 2 * erode_radius + 1),
cv::Point(erode_radius, erode_radius)));
grid_map::GridMapCvConverter::addLayerFromImage<cv::uint8_t, 1>(elevation_data_mask, "mask_eroded", slope_map, 0, 255,
0);

cv::dilate(elevation_data_mask, elevation_data_mask,
cv::getStructuringElement(cv::MORPH_RECT, cv::Size(2 * dilate_radius + 1, 2 * dilate_radius + 1),
cv::Point(dilate_radius, dilate_radius)));
grid_map::GridMapCvConverter::addLayerFromImage<cv::uint8_t, 1>(elevation_data_mask, "mask_dilated", slope_map, 0,
255, 0);

grid_map_msgs::GridMap output_message;
grid_map::GridMapRosConverter::toMessage(output_map, output_message);
grid_map::GridMapRosConverter::toMessage(slope_map, output_message);
traversability_map_pub_.publish(output_message);
}

Expand Down
5 changes: 4 additions & 1 deletion igvc_perception/src/slope_filter/slope_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define SRC_SLOPE_FILTER_H

#include <ros/ros.h>
#include <filters/filter_chain.h>
#include <filters/filter_chain.hpp>
#include <grid_map_core/GridMap.hpp>
#include <grid_map_msgs/GridMap.h>

Expand All @@ -17,6 +17,9 @@ class TraversabilityFilter
ros::Publisher traversability_map_pub_;
filters::FilterChain<grid_map::GridMap> filter_chain_;

int erode_radius;
int dilate_radius;

void elevationMapCallback(const grid_map_msgs::GridMap& message);
};

Expand Down