Skip to content
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
76 changes: 58 additions & 18 deletions config/perception.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,15 @@
"boundary_radius": 0.15,
"goal_threshold": 0.1,
"search_radius": 0.5,
"lambda_distance": 1.0,
"lambda_penalty": 1.0,
"max_neighbors": 11
"distance_coeff": 1.0,
"straightness_coeff": 2.0,
"traversibility_coeff": 1.0,
"verification_range": 1.5,
"verification_degree": 2,
"max_neighbors": 11,
"map_obstacle_merge_window": 0.5,
"map_passive_crop_horizontal_range": 10.0,
"map_passive_crop_vertical_range": 5.0
}
},
"sim":
Expand Down Expand Up @@ -489,7 +495,7 @@
},
"robot_tf":
{
"pragma:default": "lance",
"pragma:default": "lance2",
"lance":
{
"robot_description":
Expand All @@ -499,8 +505,6 @@
"links": [
"base_link",
"frame_link",
"left_track_link",
"right_track_link",
"collection_link",
"lidar_link",
"lidar_link_inv_rotated"
Expand All @@ -512,18 +516,6 @@
"child": "frame_link",
"origin": { "xyz": [0, 0, 0.13103567] }
},
"left_track_joint": {
"type": "fixed",
"parent": "frame_link",
"child": "left_track_link",
"origin": { "xyz": [0.20318559, 0.289888, 0.00242022] }
},
"right_track_joint": {
"type": "fixed",
"parent": "frame_link",
"child": "right_track_link",
"origin": { "xyz": [0.20318559, -0.289888, 0.00242022] }
},
"dump_joint": {
"type": "revolute",
"parent": "frame_link",
Expand Down Expand Up @@ -561,6 +553,54 @@
}
}
}
},
"lance2":
{
"robot_description":
{
"name": "lance2",
"structure":
{
"links": [
"base_link",
"hopper_link",
"lidar_link"
],
"joints":
{
"hopper_joint":
{
"type": "revolute",
"parent": "base_link",
"child": "hopper_link",
"origin":
{
"xyz": [-0.4572, 0, 0.3488],
"rpy": [0, 0.175, 0]
},
"axis": [0, 1, 0],
"limit":
{
"upper": 0.175,
"lower": -0.175,
"effort": 100,
"velocity": 100
}
},
"lidar_joint":
{
"type": "fixed",
"parent": "base_link",
"child": "lidar_link",
"origin":
{
"xyz": [0.5156, 0.0, 0.5691],
"rpy": [3.14159, 0.349066, 0.0]
}
}
}
}
}
}
},
"bag_play":
Expand Down
80 changes: 0 additions & 80 deletions include/modules/accumulator_map.hpp

This file was deleted.

22 changes: 9 additions & 13 deletions include/modules/impl/kfc_map_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ void KFCMap<PointT, MapT>::applyParams(

if (voxel_res > 0.)
{
this->map_octree.setResolution(voxel_res);
this->map_octree.reconfigure(voxel_res);
}
}

template<typename PointT, typename MapT>
void KFCMap<PointT, MapT>::setBounds(
const Vec3f& min,
const Vec3f& max)
void KFCMap<PointT, MapT>::setBounds(const Vec3f& min, const Vec3f& max)
{
std::unique_lock<std::mutex> lock{this->mtx};

Expand All @@ -87,12 +85,11 @@ void KFCMap<PointT, MapT>::setBounds(

template<typename PointT, typename MapT>
template<int CollisionV, typename RayDirT>
typename KFCMap<PointT, MapT>::UpdateResult
KFCMap<PointT, MapT>::updateMap(
const Vec3f& origin,
const pcl::PointCloud<PointT>& pts,
const std::vector<RayDirT>* inf_rays,
const pcl::Indices* pt_indices)
typename KFCMap<PointT, MapT>::UpdateResult KFCMap<PointT, MapT>::updateMap(
const Vec3f& origin,
const PointCloudT& pts,
const std::vector<RayDirT>* inf_rays,
const pcl::Indices* pt_indices)
{
UpdateResult results{};
if (pt_indices && pt_indices->size() <= 0)
Expand Down Expand Up @@ -135,8 +132,7 @@ typename KFCMap<PointT, MapT>::UpdateResult
// prepare submap range buffer
if (!this->submap_ranges)
{
this->submap_ranges =
std::make_shared<pcl::PointCloud<CollisionPointT>>();
this->submap_ranges = std::make_shared<CollisionPointCloudT>();
}
this->submap_ranges->clear();
this->submap_ranges->reserve(buff.search_indices.size());
Expand Down Expand Up @@ -284,7 +280,7 @@ typename KFCMap<PointT, MapT>::UpdateResult
itr != buff.submap_remove_indices.end();
itr++)
{
this->map_octree.deletePoint(*itr);
this->map_octree.deletePoint(*itr, true);
}
// add source points
this->map_octree.addPoints(pts, &buff.points_to_add);
Expand Down
Loading