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

Error while starting IPvX agent! #325

Closed
mohamed1915 opened this issue Dec 22, 2022 · 12 comments
Closed

Error while starting IPvX agent! #325

mohamed1915 opened this issue Dec 22, 2022 · 12 comments

Comments

@mohamed1915
Copy link

I'm running a multiple part simulation with gazebo ros2 and and micro ros agent.

I launch the agent with : cmd=['micro-ros-agent', 'udp4', '--port', '8888' ]

Is the error for the DDS or from another component? do you have an idea of how I can I get more info about the error?

@pablogs9
Copy link
Member

Which is the error and how can we reproduce it?
Also, please open issues in micro-ROS Agent repo if you are using micro-ROS Agent, not in XRCE-DDS Agent.

@mohamed1915
Copy link
Author

The error is in the title, it shows "Error while starting IPvX agent!". Concerning your second point I found that this error message exits in the function launch_agent() in the file ArgumentParser.hpp in the XRCE-DDS Agent. Maybe I'm wrong, but does that not mean the issue is more with XRCE? what can cause this error?

@pablogs9
Copy link
Member

Do you have this error if you launch ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888?

@mohamed1915
Copy link
Author

I launch it with a code cmd=['micro-ros-agent', 'udp4', '--port', '8888' ] which I think is equivalent.

@pablogs9
Copy link
Member

Could you test if there is an error if you launch ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888?

@mohamed1915
Copy link
Author

I installed the micro ros agent with snap so I don't have a ros package to run from the ws, is this wrong, am I missing sth?

@pablogs9
Copy link
Member

snap is kind of outdated and unsupported for micro-ROS Agent due to problems with accessing serial ports and shared memory volumes.

Consider using dockers or binary distributions: https://docs.vulcanexus.org/en/latest/rst/installation/linux_binary_installation.html

@mohamed1915
Copy link
Author

I will remove the snap installed version and install using binaries and retest and see and let you know, thank you

@achyutsun
Copy link

achyutsun commented Feb 16, 2023

Hi @pablogs9 , I am also not able to start IPvX agent from micro-ROS, please help. I followed Step 8 on https://medium.com/@SameerT009/connect-esp32-to-ros2-foxy-5f06e0cc64df . Thank you.

achyut@achyutu:~/microros_ws$ ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888         
[1676560888.406331] error    | UDPv4AgentLinux.cpp | init                     | bind error             | port: 8888, errno: 98
Error while starting IPvX agent!                                                
[1676560888.406597] info     | UDPv4AgentLinux.cpp | fini                     | server stopped         | port: 8888                                                                              
achyut@achyutu:~/microros_ws$ 

@achyutsun
Copy link

achyutsun commented Feb 16, 2023

I was able to progress from the 'Error while starting IPvX agent!' , by killing/closing the process using that socket as suggested in https://stackoverflow.com/questions/4465959/python-errno-98-address-already-in-use
But I am not able to continue, as I only see the bellow message in terminal and it doesn't progress(blocker now). Please suggest if I need to create another issue or if I can follow up in this same issue.
Also please note my error was 'errno: 98 Error while starting IPvX agent!' which got resolved by solving problem of Address/Socket already in use. Thank you.

achyut@achyutu:~/microros_ws$ ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888                       
[1676565117.056567] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888                                                                                        
[1676565117.057040] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4

@achyutsun
Copy link

achyutsun commented Feb 16, 2023

My above remaining issue of not establishing the session with Microcontroller(ESP32 in my case) is resolved. I just had to press the 'Reset' button in ESP32 and it started establishing session. I subscribed to 'freertos_int32_publisher' in another terminal and I started receiving message/data' Thanks

achyut@achyutu:~/microros_ws$ ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888    
[1676565117.056567] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 88                                                                                          
[1676565117.057040] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4                                                                            
[1676566660.628553] info     | Root.cpp           | create_client            | create                 | client_key: 0x2366888D, session_id: 0x81                                                    
[1676566660.628806] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x2366888D, address: 192.168.0.126:52712                                        
[1676566660.663359] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x2366888D, participant_id: 0x000(1)                                            
[1676566660.676908] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x2366888D, topic_id: 0x000(2), participant_id: 0x000(1)                        
[1676566660.685885] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x2366888D, publisher_id: 0x000(3), participant_id: 0x000(1)                    
[1676566660.695091] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x2366888D, datawriter_id: 0x000(5), publisher_id: 0x000(3)

@Acuadros95
Copy link
Contributor

Closing as issue looks resolved, reopen if needed

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