introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
974 stars 557 forks source link

OpenGL errors detected: Invalid enum #665

Open FungusTheLoon opened 2 years ago

FungusTheLoon commented 2 years ago

I installed rtbmap_ros, but when running roslaunch rtabmap.launch I get the following errors:

Warning: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 643 vtkXOpenGLRenderWindow (0xaaaaeaa852f0): VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with earlier versions of OpenGL but some features may not work.

Warning: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 643 vtkXOpenGLRenderWindow (0xaaaaeaf60640): VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with earlier versions of OpenGL but some features may not work.

ERROR: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 3535 vtkOpenGLPolyDataMapper (0xaaaaeaf44ec0): failed after BuildBufferObjects 1 OpenGL errors detected 0 : (1280) Invalid enum

ERROR: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1794 vtkOpenGLPolyDataMapper (0xaaaaeaf44ec0): failed after UpdateShader 1 OpenGL errors detected 0 : (1280) Invalid enum

ERROR: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLActor.cxx, line 107 vtkOpenGLActor (0xaaaaea781300): failed after Render 1 OpenGL errors detected 0 : (1280) Invalid enum

Are the errors related to the warning about OpenGL version 3.2? If so, how can I upgrade it?

Additional informations

I am working with Raspberry4 (8GB) and Ubuntu MATE 20.04 64-bit.

~$ glxinfo | grep "OpenGL version" OpenGL version string: 2.1 Mesa 21.0.3

~$ glxinfo | grep Mesa client glx vendor string: Mesa Project and SGI OpenGL version string: 2.1 Mesa 21.0.3 OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.0.3

matlabbe commented 2 years ago

I tested on my RPI4, and I get the same errors:

ERROR: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 3535
vtkOpenGLPolyDataMapper (0xaaab05feb1a0): failed after BuildBufferObjects 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1794
vtkOpenGLPolyDataMapper (0xaaab05feb1a0): failed after UpdateShader 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In /build/vtk7-kRjOS9/vtk7-7.1.1+dfsg2/Rendering/OpenGL2/vtkOpenGLActor.cxx, line 107
vtkOpenGLActor (0xaaab12a41910): failed after Render 1 OpenGL errors detected
  0 : (1280) Invalid enum

However, rtabmapviz seems working (almost) as expected:

Screenshot at 2021-11-02 11-43-57 The items in the 3D view are not correctly drawn in correct order, but it doesn't crash. I would recommend to use RVIZ on RPI instead, which seems faster to render and there are no foreground/background issues: Screenshot at 2021-11-02 11-36-44

Above has been tested with robot mapping demo: http://wiki.ros.org/rtabmap_ros#Robot_mapping

FungusTheLoon commented 2 years ago

Thanks for the info that you have the same OpenGL errors. I was so fixated on the OpenGl errors that I didn't pay attention to anything else. My big mistake was that I hadn't started the realsense launch before the rtabmap launch. I assumed that everything was already included in the rtabmap launch.

I am currently starting with three terminals.

Terminal 1 roslaunch realsense2_camera rs_camera.launch align_depth:=true unite_imu_method:="linear_interpolation" enable_gyro:=true enable_accel:=true

Terminal 2 rosrun imu_filter_madgwick imu_filter_node _use_mag:=false _publish_tf:=false _publish_tf:=false /imu/data_raw:=/camera/imu /imu/data:=/rtabmap/imu

Terminal 3 source /opt/ros/noetic/setup.bash roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start --Optimizer/GravitySigma 0.3" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info approx_sync:=false wait_imu_to_init:=true imu_topic:=/rtabmap/imu

Now it works, but not really well. It is a bit better if I start a fourth terminal with rviz for some visuel output. It seems that your combination (hardware+software) is much better.

matlabbe commented 2 years ago

Ah well, the demo robot mapping is just doing the map at 1 Hz, there is no odometry re-computed. Visual odometry on RPI4 can be quite slow. Not sure which realsense you are using, but I generally prefer using IR mode for larger field of view and better time synchronization between left IR and depth image, like the IR-Depth example on this tutorial (like said in the tutorial, don't forget to disable emitter_enabled):

RealSense D435i camera (IR-Depth):

 $ roslaunch rtabmap_ros rtabmap.launch \
   rtabmap_args:="--delete_db_on_start" \
   rgb_topic:=/camera/infra1/image_rect_raw \
   depth_topic:=/camera/depth/image_rect_raw \
   camera_info_topic:=/camera/infra1/camera_info \
   wait_imu_to_init:=true \
   imu_topic:=/rtabmap/imu
Aliffahmi123 commented 1 year ago

goodnight, i'm students, looks same problem in my project, i use ROS noetic ubuntu Mate 20.04, when i install rtabmap, i stuck build in 80% , and then error "make -j4 failed", when i launch rtabmap, there is UI open from rtabmap, but just blank sheet, i use kinect sensor, can you help me? this is my last project in collage, thanks🙏

matlabbe commented 1 year ago

i stuck build in 80%

You should be able to install rtabmap binaries on Ubuntu Mate, if you installed the 64 bits version.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

sudo apt update
sudo apt install ros-noetic-rtabmap-ros
Aliffahmi123 commented 1 year ago

hai, do you have social media? i still need your help, please

Pada tanggal Sen, 12 Des 2022 03.55, matlabbe @.***> menulis:

i stuck build in 80% You should be able to install rtabmap binaries on Ubuntu Mate, if you installed the 64 bits version.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

sudo apt update sudo apt install ros-noetic-rtabmap-ros

— Reply to this email directly, view it on GitHub https://github.com/introlab/rtabmap_ros/issues/665#issuecomment-1345654125, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCS4IE6ETFKP5MEC2KQHOLWMY5VNANCNFSM5GQF6EJQ . You are receiving this because you commented.Message ID: @.***>

Aliffahmi123 commented 1 year ago

i got some errors like this, can you help me? i use kinect sensor

Pada tanggal Sen, 12 Des 2022 03.55, matlabbe @.***> menulis:

i stuck build in 80% You should be able to install rtabmap binaries on Ubuntu Mate, if you installed the 64 bits version.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

sudo apt update sudo apt install ros-noetic-rtabmap-ros

— Reply to this email directly, view it on GitHub https://github.com/introlab/rtabmap_ros/issues/665#issuecomment-1345654125, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCS4IE6ETFKP5MEC2KQHOLWMY5VNANCNFSM5GQF6EJQ . You are receiving this because you commented.Message ID: @.***>