mcsix / xela_server_ros

ROS Node for XELA Sensors (ROS 1)
MIT License
3 stars 1 forks source link

Connect refused appears when starting the node #1

Open DongMuJi opened 6 months ago

DongMuJi commented 6 months ago

Hi,

After we started service.launch, we found that this error message would appear five times, ERROR: Connect refused. Retrying in 0.5 seconds... For specific error information, please view the attached picture.

p

System environment: Ubuntu20.04 ROS Noetic Hardware: uSPa46 Xela software: V1.7.7

There is no problem using ./xela_server and ./xela_viz in the official manual. After the above five errors occur, the connection seems to be normal, and the data can be printed out through the topic. I don’t know if these errors are program bugs. I tried many times and the same thing happened every time.

mcsix commented 6 months ago

Have you installed xela_server from the official download page to a directory in the $PATH variable? It is possible that the application is not running. If it is, please provide the full output of your terminal window when running the service.launch.

DongMuJi commented 6 months ago

The path where xela_server is located has been added to $PATH

DongMuJi commented 6 months ago

Sorry, the problem description was not posted in full before. Please read the complete description again.

mcsix commented 6 months ago

Are you running xela_server separately? In this pack, there is a script that would set up the server app automatically and requires it to be on the $PATH, which you have done. If you can, please send me the logs from the /etc/xela/LOG directory, if it is set up and all the service logs as those could give more insight to the problem

DongMuJi commented 6 months ago

I did not run xela_server separately because I saw that xela_server would be run in the launch file.

LOG.zip

mcsix commented 6 months ago

I have run the service.launch on the test system with different variants and haven't been able to reproduce the situation. Where do you keep your xela_server executable?

DongMuJi commented 6 months ago

The xela_server in the /etc/exla directory.

mcsix commented 6 months ago

While this is not an ideal directory for the app, I will need to run more tests to see if it would affect it in such a way.

Are you also saying that it will work after the five connection attempts? If so, there could also be the ROS release at play. Is it the latest Noetic release? I can hopefully run some more tests on it tomorrow.

To explain the error it gives: the websocket connection to the server could not be established in time, causing timeout event. It could also happen if the computer is very slow at starting the xela_server application. With 1.7.6 and newer, there is file scanning algorithm that can also be taxing on systems and it is used to find all .xela, .xdef and .xcal files under current and sub-directories. If running the application from a directory that has many sub-directories, it will take longer to start up. This is an element that will have a fix coming in the next bigger release to limit the depth to 2.

DongMuJi commented 6 months ago

Thank you very much for your help. I will try to change the directory of the executable file.

At present, my test here shows that this is the case. After 5 errors, there will be no more errors, and the printing topic will have data output. I am using the latest Noetic release.

I will also try to change the computer and reconfigure the software to test again. If there is any progress, I will inform you in time. Thank you again for your help.