ocs2
ocs2 copied to clipboard
It seems that a cpp file to "SegmentedPlanesSignedDistanceField.h" is missing in ocs2_robotic_examples/ocs2_perceptive_anymal/segmented_planes_terrain_model/src
In OCS2 V12.0
Errors
/home/user/ocsws/src/ocs2/ocs2_robotic_examples/ocs2_perceptive_anymal/segmented_planes_terrain_model/include/segmented_planes_terrain_model/SegmentedPlanesSignedDistanceField.h: In constructor ‘switched_model::SegmentedPlanesSignedDistanceField::SegmentedPlanesSignedDistanceField(const grid_map::GridMap&, const string&, double, double)’:
/home/user/ocsws/src/ocs2/ocs2_robotic_examples/ocs2_perceptive_anymal/segmented_planes_terrain_model/include/segmented_planes_terrain_model/SegmentedPlanesSignedDistanceField.h:23:59: error: no matching function for call to ‘grid_map::SignedDistanceField::SignedDistanceField(const grid_map::GridMap&, const string&, double&, double&)’
23 | : sdf_(gridMap, elevationLayer, minHeight, maxHeight) {}
Looks like this is a dependency from elveation_mapping_cupy. Which makes some sense since grid map is very closely related to elevation_mapping. Also seems to be an issue with packages missing grid_map_filters_rsl Try adding this package and rebuilding: https://github.com/leggedrobotics/elevation_mapping_cupy/tree/main/plane_segmentation
The Errors shows that the class grid_map::SignedDistanceField
corresponding to sdf_
does not have the grid_map::SignedDistanceField::SignedDistanceField(const grid_map::GridMap&, const string&, double&, double&)
method. I guess that the grid_map
library you are using comes from the command like sudo apt install ros-noetic-grid-map*
, the libraries inside have not been updated. I specifically went to the source file to view it, and you can see that there is indeed no construction method mentioned above.
however, when you go to github to find the source code, you will find that this piece of code has been updated.
So, you should remove the
grid_map
library with the command sudo apt remove ros-noetic-grid-map*
, then clone source code from github directly with command git clone [email protected]:ANYbotics/grid_map.git
into your src folder, and re catkin build
.
The Errors shows that the class
grid_map::SignedDistanceField
corresponding tosdf_
does not have thegrid_map::SignedDistanceField::SignedDistanceField(const grid_map::GridMap&, const string&, double&, double&)
method. I guess that thegrid_map
library you are using comes from the command likesudo apt install ros-noetic-grid-map*
, the libraries inside have not been updated. I specifically went to the source file to view it, and you can see that there is indeed no construction method mentioned above.however, when you go to github to find the source code, you will find that this piece of code has been updated.
So, you should remove the
grid_map
library with the commandsudo apt remove ros-noetic-grid-map*
, then clone source code from github directly with commandgit clone [email protected]:ANYbotics/grid_map.git
into your src folder, and recatkin build
.
Very helpful!