ocs2 icon indicating copy to clipboard operation
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

Open Mayflyday opened this issue 1 year ago • 3 comments

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) {}

Mayflyday avatar Nov 29 '23 17:11 Mayflyday

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

NmBoyd avatar Jan 21 '24 21:01 NmBoyd

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. image however, when you go to github to find the source code, you will find that this piece of code has been updated. image 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.

JunJieChenpete avatar Mar 13 '24 14:03 JunJieChenpete

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. image however, when you go to github to find the source code, you will find that this piece of code has been updated. image 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.

Very helpful!

Dicer-J avatar Mar 22 '24 14:03 Dicer-J