Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"disconnected" Error #7

Open
amiryanj opened this issue Apr 9, 2024 · 11 comments
Open

"disconnected" Error #7

amiryanj opened this issue Apr 9, 2024 · 11 comments

Comments

@amiryanj
Copy link

amiryanj commented Apr 9, 2024

Hey,

We are facing this "disconnected" error without anymore clue of why it's hapenning.
Here is the command we are executing:

ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=169.254.153.200 nao_port:=9503 nao_username:=nao nao_password:=<pass> qi_listen_url:=0.0.0.0:0 

And it is being run on Ubuntu 22.04 with ROS Humble. The same setup was working when trying on Ubuntu 20.04 and ROS Noetic, even though there we had to also set the ROS_MASTER_URI.

[INFO] [naoqi_driver_node-1]: process started with pid [15992]
[naoqi_driver_node-1] disconnected
[naoqi_driver_node-1] naoqi driver is shutting down..
[naoqi_driver_node-1] cannot publish data, at ./src/rmw_publish.cpp:62 during '__function__'
[naoqi_driver_node-1] [ERROR] [1712672996.880189984] [naoqi_driver.rclcpp]: Error in destruction of rcl subscription handle: Failed to delete datareader, at ./src/subscription.cpp:52, at ./src/rcl/subscription.c:184
[naoqi_driver_node-1] cannot publish data, at ./src/rmw_publish.cpp:62 during '__function__'
[naoqi_driver_node-1] Fail in delete datareader, at ./src/rmw_service.cpp:104 during '__function__'
[ERROR] [naoqi_driver_node-1]: process has died [pid 15992, exit code -11, cmd '/home/jetson/ros2_ws/install/naoqi_driver/lib/naoqi_driver/naoqi_driver_node --ros-args --params-file /tmp/launch_params_4p3b06oj'].
@victorpaleologue
Copy link
Contributor

What if you prefix your nao_ip arg with tcps:// ?

@polmagri
Copy link

I tried to follow your advice, but it gives me this error

ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=tcps://169.254.70.235 nao_port:=9503 nao_username:=nao nao_password:=PASS qi_listen_url:=0.0.0.0:0
[INFO] [launch]: All log files can be found below /home/jetson/.ros/log/2024-04-12-17-26-49-481337-orin-desktop-51334 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [naoqi_driver_node-1]: process started with pid [51335] [naoqi_driver_node-1] [W] 1712935609.815791 51335 qi.url: Could not parse port '//169.254.70.235:9503' from url 'tcp://tcps://169.254.70.235:9503' (errno:0, strerror:'Success') [naoqi_driver_node-1] Connect error: 14: Bad address [naoqi_driver_node-1] naoqi driver is shutting down.. [naoqi_driver_node-1] cannot publish data, at ./src/rmw_publish.cpp:62 during '__function__' [naoqi_driver_node-1] [ERROR] [1712935610.436261888] [naoqi_driver.rclcpp]: Error in destruction of rcl subscription handle: Failed to delete datareader, at ./src/subscription.cpp:52, at ./src/rcl/subscription.c:184 [naoqi_driver_node-1] cannot publish data, at ./src/rmw_publish.cpp:62 during '__function__' [naoqi_driver_node-1] Fail in delete datareader, at ./src/rmw_service.cpp:104 during '__function__' [ERROR] [naoqi_driver_node-1]: process has died [pid 51335, exit code -11, cmd '/home/jetson/ros2_ws/install/naoqi_driver/lib/naoqi_driver/naoqi_driver_node --ros-args --params-file /tmp/launch_params_f2m_n_z_'].

@victorpaleologue
Copy link
Contributor

My bad, this attempt was misguided.
Can you confirm the system you're working with?
Is it a Pepper with NAOqi 2.9?

@amiryanj
Copy link
Author

Hey @victorpaleologue
Yes. I confirm the version is 2.9

@victorpaleologue
Copy link
Contributor

Is the log complete?
It's curious, it behaves as if the TLS handshake failed.
It could be related to the keys of the robot under /home/nao/local/share/qi or naoqi.
If so I think we'd see something in the journal (journalctl on the robot).
At this time I don't have time to try to reproduce it, so you'll have to dig deeper.

@polmagri
Copy link

I do see the following files in ls /home/nao/.local/share/naoqi:

apps                                   qi.private.aldebaran.lan.key          tmp_isolated_French.lcf
asr                                    qi.public.aldebaran.lan-crypt-tablet  tmp_ws_English.lcf
expressiveness                         qi.public.aldebaran.lan.crt           tmp_ws_French.lcf
qi.private.aldebaran.lan-crypt-tablet  qi.public.aldebaran.lan.csr           vision
qi.private.aldebaran.lan.crt           qi.public.aldebaran.lan.key
qi.private.aldebaran.lan.csr           tmp_isolated_English.lcf

No idea, what to try here.

I also realized the datetime is not set correctly on the robot. (On the tablet it's Ok.)
And it seems it requires sudo permission to set the date, that I have no idea of the password.
Do you think it can be relevant to this error?

@victorpaleologue
Copy link
Contributor

The keys and certificates seem present, and we should not touch them yet.

It's a possible the date is a reason for the failure... But then the tablet would have an issue connecting too!
Are the robot settings available as they should, from the tablet?
https://www.aldebaran.com/en/support/pepper-naoqi-2-9/5-settings

But I doubt it, because that wouldn't explain a difference between Noetic and Humble 🤔
In the end I must have left a bug there. I hope it's not about libqi versions.

@amiryanj
Copy link
Author

Right. I just double checked with ROS Noetic.
It sounds to be working without a problem.
For now we might move forward by bridging between ros1 and ros2.
But if you manage to find the solution, keep us updated please.

@victorpaleologue
Copy link
Contributor

I figured it out. It's qi_listen_url:=0.0.0.0:0 that is lacking the tcp:// protocol information. I'm fixing this and in the meantime you can do:

ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=169.254.153.200 nao_port:=9503 nao_username:=nao nao_password:=<pass> qi_listen_url:=tcp://0.0.0.0:0

@victorpaleologue
Copy link
Contributor

README has just been updated.

@MouadAbrini
Copy link

MouadAbrini commented May 7, 2024

Hello @victorpaleologue,
We just tested the updated command, and it doesn't seem to fix the issue.

ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=169.254.216.198 nao_port:=9503 nao_username:=nao nao_password:=<pass> qi_listen_url:=tcp://0.0.0.0:0

We still get the disconnected error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants