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

catkin build failed #7

Open
XieWup opened this issue Nov 29, 2024 · 6 comments
Open

catkin build failed #7

XieWup opened this issue Nov 29, 2024 · 6 comments

Comments

@XieWup
Copy link

XieWup commented Nov 29, 2024

Hi,
after running the "catkin build" command, the terminal printed the following error:

WARNING: Your current environment's CMAKE_PREFIX_PATH is different from
the cached CMAKE_PREFIX_PATH used the last time this workspace was
built.

If you want to use a different CMAKE_PREFIX_PATH you should call catkin clean to remove all references to the previous CMAKE_PREFIX_PATH.

Cached CMAKE_PREFIX_PATH:
/home/liangs/anjoy_ws/devel:/opt/ros/melodic
Current CMAKE_PREFIX_PATH:
/home/liangs/anjoy_ws/devel/.private/catkin_tools_prebuild:/home/liangs/anjoy_ws/devel:/opt/ros/melodic

[build] Found '5' packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> groundgrid


Errors << groundgrid:make /home/liangs/anjoy_ws/logs/groundgrid/build.make.001.log
/home/liangs/anjoy_ws/src/groundgrid/src/GroundGridNodelet.cpp: In member function ‘void groundgrid::GroundGridNodelet::publish_grid_map_layer(const image_transport::Publisher&, const string&, int, const ros::Time&)’:
/home/liangs/anjoy_ws/src/groundgrid/src/GroundGridNodelet.cpp:241:55: error: ‘COLORMAP_TWILIGHT’ is not a member of ‘cv’
cv::applyColorMap(img, color_img, cv::COLORMAP_TWILIGHT);
^~~~~~~~~~~~~~~~~
/home/liangs/anjoy_ws/src/groundgrid/src/GroundGridNodelet.cpp:241:55: note: suggested alternative: ‘COLORMAP_WINTER’
cv::applyColorMap(img, color_img, cv::COLORMAP_TWILIGHT);
^~~~~~~~~~~~~~~~~
COLORMAP_WINTER
make[2]: *** [CMakeFiles/groundgrid_nodelet.dir/src/GroundGridNodelet.cpp.o] Error 1
make[1]: *** [CMakeFiles/groundgrid_nodelet.dir/all] Error 2
make: *** [all] Error 2
cd /home/liangs/anjoy_ws/build/groundgrid; catkin build --get-env groundgrid | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed << groundgrid:make [ Exited with code 2 ]
Failed <<< groundgrid [ 13.5 seconds ]
[build] Summary: 0 of 1 packages succeeded.
[build] Ignored: 4 packages were skipped or are blacklisted.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: 1 packages failed.
[build] Runtime: 13.5 seconds total.

@zhyzhyzhy123
Copy link

seems the wrong version of opencv?

@XieWup
Copy link
Author

XieWup commented Dec 2, 2024

seems the wrong version of opencv?

OK . What version of OpenCV are you using

@zhyzhyzhy123
Copy link

zhyzhyzhy123 commented Dec 2, 2024

seems the wrong version of opencv?

OK . What version of OpenCV are you using

ros-noetic-vision-opencv 1.16.2-1focal.20230620.193649 and libopencv-dev 4.2.0+dfsg-5

if you needed, I can share my docker container.

@XieWup
Copy link
Author

XieWup commented Dec 2, 2024

ros-noetic-vision-opencv 1.16.2-1focal.20230620.193649 and libopencv-dev 4.2.0+dfsg-5

if you needed, I can share my docker container.

Oh, Your environment is quite different from mine, maybe I should try another solution. Thank you very much

@zhyzhyzhy123
Copy link

ros-noetic-vision-opencv 1.16.2-1focal.20230620.193649 and libopencv-dev 4.2.0+dfsg-5
if you needed, I can share my docker container.

Oh, Your environment is quite different from mine, maybe I should try another solution. Thank you very much

if you try it in melodic, I guess you need to change a lot of things XD.

@Nussknacker
Copy link
Collaborator

Hi @XieWup,

GroundGrid targets ROS Noetic Ninjemys, so compiling it with an older ROS distribution (it looks like you're using melodic) might lead to compiler/runtime issues.
This particular error with the OpenCV colormap can be easily fixed by using another colormap or removing the colormap function call. It is only needed for visualization purposes and it is not used for the ground segmentation. However, you might face more errors that might be more difficult to fix. That's why I'd recommend upgrading the ROS installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants