Tag Archives: ROS

Qxcbcconnection: xcb error: 148 error while ROS is running rviz

reason:

Because VNC is used to remotely control the lower computer, rviz is a graphics plug-in developed based on OpenGL. Theoretical screen parameters (the tis’ screen) need to be used. Using VNC will lead to incorrect screen parameter values, resulting in rviz errors.

resolvent:

1) Connect the display in the lower computer, and then turn on rviz on the PC enabled with VNC to temporarily solve the problem.

2) Use SSH instead of VNC to control the lower computer remotely. Pay attention to closing the VNC process running in the background, otherwise the core dump problem will occur when running rviz. In addition, due to the impact of network speed, there may be a stuck problem.

Running realsense ROS reports an error, USB cam overflow, hardware error

Run the command roslaunch realsense2_ camera rs_ The following error message appears in camera.launch:

resolvent:

The reason for this problem is not that the driver is not installed properly, but because the realsense is connected to the computer through the USB2.0 interface, the transmission speed is slow, resulting in data overflow and loss. The problem can be solved by connecting through USB3.0.

Error reporting of OpenCV and Darknet under Python 2.7

Error reporting of OpenCV and Darknet under Python 2.7

Python 2.7 is run by default during the whole ROS. I don’t know how to adjust it, so Yolo can’t run. The following error is reported

Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

The solution is to recompile opencv in the following order

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_GTK=ON -D WITH_OPENGL=ON ..

sudo make install

[Solved] ERROR: error loading sources list: The read operation timed out

During the installation of ROS platform under Ubuntu 20.04 system, an error is reported during the initialization of rosdep

rosdep update

Super times error

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: error loading sources list:
	The read operation timed out

When you execute rosdep update according to the method in this article, there is still a timeout error, and you think of adding it directly in sources. List. D https://ghproxy.com/ Prefix, as follows:

Connect the mobile phone hotspot and open the terminal for execution

sudo vim /etc/ros/rosdep/sources.list.d/20-default.list

Modify list content

# os-specific listings first
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

Then run rosdep update to solve the problem.

[email protected]:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/ubuntu/.ros/rosdep/sources.cache

AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘ [How to Solve]

The error details are as follows:

Traceback (most recent call last):
  File "/usr/local/bin/evo_traj", line 5, in <module>
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 62, in apport_excepthook
    if not enabled():
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/evo_traj", line 5, in <module>
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Problem analysis
this problem has not occurred before. It is suspected that the python iteration version conflict is caused by the update of Ubuntu system. It is recommended to turn off the automatic update of Ubuntu to prevent such problems. It takes a long time to solve some version conflict problems.

Solution:
the query found that pythonpath was set incorrectly. The configuration left by the previous use of python2 was saved in. Bashrc, resulting in python3 unable to find the correct enum location. After commenting out the relevant statements in bashrc, clear the $pythonpath variable:

 unset PYTHONPATH
 echo $PYTHONPATH

Then it can be used normally. Pythonpath is a multi-purpose configuration in python2. It is generally no longer needed after using python3.

Solution to error reporting in opencv4.0 compilation of logo-logo

Problem Description:

Recently, when learning integrated navigation, Ubuntu 20 + opencv4.0 was used. When compiling logo-beam, the following error messages were encountered:

10: fatal error: opencv/CV. H: no such file or directory
13 |#include & lt; opencv/cv.h>

Solution:

This is caused by the version change of OpenCV library. Put #include & lt; opencv/cv.h> Replace with #include & lt; opencv2/opencv.hpp> Just.

An error occurred during the signature verification in the ROS function pack warehouse

When we install the ros-related packages or perform sudo apt-get update on a linux system with ros installed, the following error will occur:

Get:1 http://packages.ros.org/ros/ubuntu focal InRelease [4,676 B]
Hit:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Err:1 http://packages.ros.org/ros/ubuntu focal InRelease
The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics [email protected]
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Fetched 4,676 B in 4s (1,078 B/s)
Reading package lists… Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ros.org/ros/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics [email protected]
W: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/focal/InRelease The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics [email protected]
W: Some index files failed to download. They have been ignored, or old ones used instead.

Why does this error occur?
ROS uses the debian package management system to distribute software, so it needs a GPG key to ensure the accuracy and authority of the package, usually the default key expires after about 2 years, so we need to add a new ros related key to it.

How to fix it
Download the certificate and add it.

curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key
sudo apt-key add ./ros.key

After the installation is successful, the log information of OK will be displayed.

$ sudo apt update
...
 Get:15 http://packages.ros.org/ros/ubuntu focal InRelease [4,676 B] 
...
 Fetched 2,671 kB in 2s (1,607 kB/s)                     
 Reading package lists… Done
 Building dependency tree       
 Reading state information… Done
 30 packages can be upgraded. Run 'apt list --upgradable' to see them.

About VMware: vmw_ ioctl_ Command error invalid argument. Solution

Development environment: windows10 + VMware + Ubuntu 18.04 + ROS

Run: gazebo

Prerequisites: installing gazebo:

sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control

Problem: run:

roscore
 rosrun gazebo_ros gazebo

appear

“VMware: vmw_ioctl_command error Invalid argument.
Aborted (core dumped)
/opt/ros/indigo/lib/gazebo_ros/gazebo: 39: kill: invalid signal number or name: SIGINT”

Set the environment variable to 0 under the terminal

$ export SVGA_VGPU10=0

Then you can run gazebo,

roscore
rosrun gazebo_ros gazebo 

Permanently available:

$ echo "export SVGA_VGPU10=0" >> ~/.bashrc

[PX4 Bug] make px4_sitl gazebo Error: CMake Error: The following variables are used in this project

Article catalog

1. Preface 2. Bug 12.1 error reporting output 2.2 solutions 2.3 reference link

3. Bug 23.1 error output 3.2 solution

4. Bug 34.1 error reporting output 4.2 solution 4.3 reference link

1. Preface

When executing make Px4_ When sitl gazebo , an error is reported.

2. Bug 1

2.1 error output

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GSTREAMER_LIBRARIES (ADVANCED)
    linked by target "gazebo_uuv_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_user_camera_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_groundtruth_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_sonar_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_lidar_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_camera_manager_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_opticalflow_mockup_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "mav_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "nav_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "std_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_opticalflow_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_airspeed_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_airship_dynamics_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_controller_interface" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "sensor_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_vision_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_gimbal_controller_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_imu_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "physics_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_wind_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_mavlink_interface" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_motor_model" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_catapult_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_multirotor_base_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_magnetometer_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_usv_dynamics_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_barometer_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_parachute_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_drop_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_gst_camera_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_irlock_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_gps_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_video_stream_widget" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "LiftDragPlugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo

-- Configuring incomplete, errors occurred!
See also "/home/zth/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/zth/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
[217/819] Linking CXX static library s...lib/mixer/SimpleMixer/libSimpleMixer.a
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure 
cd /home/zth/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /home/zth/PX4-Autopilot/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/zth/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
[227/819] Building CXX object src/lib/...MakeFiles/ecl_EKF.dir/EKFGSF_yaw.cpp.o
ninja: build stopped: subcommand failed.
Makefile:226: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1

2.2 solutions

sudo apt install libgstreamer1.0-dev
sudo apt install gstreamer1.0-plugins-good
sudo apt install gstreamer1.0-plugins-bad
sudo apt install gstreamer1.0-plugins-ugly

2.3 reference links

[1] https://github.com/PX4/PX4-Autopilot/issues/13416

3. Bug 2

3.1 error output

VMware: vmw_ioctl_command error Invalid argument.

3.2 solutions

[1] Run gazebo under the virtual machine, about vmw_ ioctl_ Command error invalid argument error

4. Bug 3

4.1 error output

[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[Err] [REST.cc:205] Error in REST request

libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'

4.2 Solution
Modify https://api.ignitionfuel.org in ~/.ignition/fuel/config.yaml to https://api.ignitionrobotics.org , it’s OK