Closed TinkerYxs closed 1 year ago
@TinkerYxs
The GTK error is most probably coming from OpenCV. I guess that you are using a custom OpenCV. To debug your issue, can you please do the following:
rosrun image_view image_view image:=/your_camera/image_topic
BTW, are you defining your new camera rfly_nodepth
? If so, we can add your contributions to this repository after discussions with you.
From your command line output I assume that you use a Nvidia Jetson board. I had this gtk version issue with my AGX Orin. My wild guess is, this is due to some openCV version mismatch from cv_bridge and openpose, see here
I did the following to solve this:
OPENCV_DIR
to the installed path of openCV in cmake-gui
interface, see this Referencecv_bridgeConfig.cmake
to tell catkin_make
to find the newly installed openCV, see this link
àpt
, then it is probably that the cv_bridge
package is also built with another openCV. To solve this, you can build the vision_opencv
with ros_openpose
using openCV 4.6:
ros_openpose
is located in ~/catkin_ws/src
.vision_opencv
, which contains cv_bridge
cd ~/catkin_ws/src
git clone https://github.com/ros-perception/vision_opencv.git
cd vision_opencv
git checkout noetic
vision_opencv
and ros_openpose
together:
cd ~/catkin_ws
catkin_make
Then it should work.
From your command line output I assume that you use a Nvidia Jetson board. I had this gtk version issue with my AGX Orin. My wild guess is, this is due to some openCV version mismatch from cv_bridge and openpose, see here
I did the following to solve this:
1. Build and install openCV 4.6 with CUDA enabled. The preinstalled openCV in Jetson Orin does not support CUDA. 2. Build openpose with openCV 4.6. You can do this by specifying `OPENCV_DIR` to the installed path of openCV in `cmake-gui` interface, see [this Reference](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/2_additional_settings.md#custom-opencv) 3. Edit `cv_bridgeConfig.cmake` to tell `catkin_make` to find the newly installed openCV, see [this link](https://github.com/ravijo/ros_openpose/issues/62#issuecomment-1123430014) * I am not sure if this step is mandatory because i tried many ways to make the whole system work. But in the end it works. 4. If you installed ROS using `àpt`, then it is probably that the `cv_bridge` package is also built with another openCV. To solve this, you can build the `vision_opencv` with `ros_openpose` using openCV 4.6: 1. Assume that your workspace of `ros_openpose` is located in `~/catkin_ws/src`. 2. Download the source code of `vision_opencv`, which contains `cv_bridge` ``` cd ~/catkin_ws/src git clone https://github.com/ros-perception/vision_opencv.git cd vision_opencv git checkout noetic ``` 3. build `vision_opencv` and `ros_openpose` together: ``` cd ~/catkin_ws catkin_make ```
Then it should work.
yes, i use jetson agx ogin and my opencv version is 4.5.4(default and not compiled by cuda), let me try your method.
@TinkerYxs
The GTK error is most probably coming from OpenCV. I guess that you are using a custom OpenCV. To debug your issue, can you please do the following:
1. Run OpenPose as a standalone program by giving an example video mentioned in [OpenPose/Quick Start Overview](https://github.com/CMU-Perceptual-Computing-Lab/openpose#quick-start-overview). 2. Please make sure GUI inside ROS works fine by executing the following command: ``` rosrun image_view image_view image:=/your_camera/image_topic ```
BTW, are you defining your new camera
rfly_nodepth
? If so, we can add your contributions to this repository after discussions with you.
my openpose runs just fine and i just use a simulation camera
From your command line output I assume that you use a Nvidia Jetson board. I had this gtk version issue with my AGX Orin. My wild guess is, this is due to some openCV version mismatch from cv_bridge and openpose, see here
I did the following to solve this:
1. Build and install openCV 4.6 with CUDA enabled. The preinstalled openCV in Jetson Orin does not support CUDA. 2. Build openpose with openCV 4.6. You can do this by specifying `OPENCV_DIR` to the installed path of openCV in `cmake-gui` interface, see [this Reference](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/2_additional_settings.md#custom-opencv) 3. Edit `cv_bridgeConfig.cmake` to tell `catkin_make` to find the newly installed openCV, see [this link](https://github.com/ravijo/ros_openpose/issues/62#issuecomment-1123430014) * I am not sure if this step is mandatory because i tried many ways to make the whole system work. But in the end it works. 4. If you installed ROS using `àpt`, then it is probably that the `cv_bridge` package is also built with another openCV. To solve this, you can build the `vision_opencv` with `ros_openpose` using openCV 4.6: 1. Assume that your workspace of `ros_openpose` is located in `~/catkin_ws/src`. 2. Download the source code of `vision_opencv`, which contains `cv_bridge` ``` cd ~/catkin_ws/src git clone https://github.com/ros-perception/vision_opencv.git cd vision_opencv git checkout noetic ``` 3. build `vision_opencv` and `ros_openpose` together: ``` cd ~/catkin_ws catkin_make ```
Then it should work.
Thank you very much, your method slove this problem, I install opencv4.6.0 and cover the default opencv4.5.4, after this I meet another problem " error while loading shared libraries: libopencv_highgui.so.406: cannot open shared object file: No such file or directory", I "sudo apt-get install libopencv-highgui-dev", then my openpose and ros_openpose run correctly.