Sometimes we have to run background tasks with a quite long duration time. However, the RabbitMQ has a default time limitation for waiting the ack. If the execution time is exceed, you will got an error message like “Delivery acknowledgement timeouts” and your channel will be broken.
Continue readingSocks5 Proxy Scheme with Remote DNS resolving
When using a Socks proxy, you must have written a string like socks5://127.0.0.1:8000 to represent the proxy protocol and address. Strings in this format are widely used in CURL based components such as Guzzle, pip, and urllib3. We often want these programs to use a Socks proxy to connect to the internet but get weird connection failures. An interesting part of these strange failures is that accessing some websites works fine, while others cannot. These failures persist even if you have confirmed that there is no failure of the proxy connection itself. At this time, I suggest you consider that these failures are caused by DNS issues, especially when you are in some special network environment, such as the network affected by DNS pollution, the Great Firewall of China or a public WIFI.
We know that the Socks proxy works at the session layer and can forward TCP connections. Furthermore, Socks4a and Socks5 support DNS forwarding. Now, the most commonly used version is Socks5. Let’s take a careful look at the proxy protocol string. The reason for the DNS resolution error is that when we use addresses starting with socks4:// or socks5://, which means the hostname will be resolved locally and get unexpected results. The local resolving is not an actual error or bug. It is a critical feature in some cases. But when you are in a restricted network, your local DNS may be polluted or unavailable. You need to change your protocol prefix to socks4a:// or socks5h://, which means the hostname will be resolved by the proxy server.
This is a problem can be solved by a simple answer and in fact well-defined in the CURL documentation. But most tutorials usually only provide a string like socks5://127.0.0.1:8000 to tell the user how to apply a Socks5 proxy. And access failures caused by DNS are often difficult to recognize and locate. Even if users know that the failure is related to DNS, it is more difficult to search for relevant answers in Google. You can find some discussions like https://github.com/urllib3/urllib3/pull/1036 and https://stackoverflow.com/a/61980997/5616769
Overall, try to use socks5h:// or socks4a:// in your proxy settings when you face some strange access failures. Hope that is helpful for you!
Examples:
1 |
python3 -m pip install numpy --proxy='socks5h://127.0.0.1:9801' |
SciRoc Challenge 2021 Pick&Pack
This video is a personal work made for studying, and does not represent the official views of universities.
TIAGO places items in Gazebo
This is a full demo of TIAGO placing items in Gazebo. The layout in the simulator comes from [email protected] Virtual 2021
Continue readingCommand \DH unavailable in encoding OT1
Recently, I have been writing papers on Overleaf. When I tried import the IEEE two columns template, Overleaf displayed many errors like this

No title bar on Gazebo7 under Ubuntu 20
osrf/rocker is a lovely docker project which make building ROS environment rapidly. It supports Ubuntu 20 and the latest Nvidia driver. ROS GUI applications and tools work properly with hardware acceleration.
However, when I tried to run Gazebo 7 under Ubuntu 20, there is no title bar on the top and I cannot resize this window.
Continue readingTo get focus automatically for created window in Tkinter (macOS)
In macOS, windows created by Tkinter do not automatically get focus. This is annoying when using PyCharm. If you do not take any actions, the created window will be hidden behind PyCharm. An alternative is to set the window to the top and then cancel it (code show as below). This will make the window visible after creation.
Continue readingUse YCB Dataset Objects in Gazebo
Although YCB Benchmarks has provided a series of mesh files, they still cannot be used directly in Gazebo because of the missing some of the physical properties.
I made SDF models for most YCB objects that can be used directly in Gazebo, and provided them with the following optimizations:
- Stable friction parameters.
- Enhanced lighting.
- HD textures.

Compile YOLOv4 with OpenMP on macOS High Sierra 10.13
Using OpenMP can improve the performance of YOLO, but turning on this option on macOS High Sierra 10.13 will cause the compilation process to fail. This article was written on 2020-12-02.
Continue readingCompile OpenCV 4 with Qt 5 for Python 3 and C++ on macOS High Sierra 10.13
This tutorial provides step-by-step instructions to compile OpenCV 4 with Qt 5 for Python 3 and C++ on macOS High Sierra 10.13. For the latest macOS version, I think you can install OpenCV from Homebrew directly. I wrote this tutorial on Dec. 2020 and the High Sierra is a previous macOS system and installing OpenCV directly from Homebrew will fail so I have to compile it manually.
Continue reading