mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
847 stars 983 forks source link

The apm.launch file reports udp0: sendto: Invalid argument. Please help! #1874

Closed AyushMaria closed 11 months ago

AyushMaria commented 11 months ago

Issue details

When I run roslaunch mavros apm.launch I face the problem below.

MAVROS version and platform

Mavros: 2.5.0
ROS: Noetic
Ubuntu: 20.04

Autopilot type and version

ArduPilot
Version: Copter-4.3.7

Node logs

[ INFO] [1689315821.530053213]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ERROR] [1689315821.624194832]: udp0: sendto: Invalid argument
terminate called after throwing an instance of 'std::system_error'
  what():  Resource deadlock avoided
[mavros-1] process has died [pid 99072, exit code -6, cmd /home/aoi/catkin_ws/devel/lib/mavros/mavros_node __name:=mavros __log:=/home/aoi/.ros/log/2535709a-2206-11ee-9b1a-bd3f2a9f5ee7/mavros-1.log].
log file: /home/aoi/.ros/log/2535709a-2206-11ee-9b1a-bd3f2a9f5ee7/mavros-1*.log
[mavros-1] restarting process
process[mavros-1]: started with pid [118540]

Diagnostics

aoi@Aoi:~$ rostopic echo -n1 /diagnostics
header: 
  seq: 0
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "Node starting up"
    hardware_id: ''
    values: []
---

Check ID

aoi@Aoi:~$ rosrun mavros checkid

ERROR. I got 0 addresses, but not your target 1:1

---
Received 0 messages, from 0 addresses
sys:comp   list of messages
sacchinbhg commented 9 months ago

I were you able to solve this issue? @AyushMaria

AyushMaria commented 9 months ago

I were you able to solve this issue? @AyushMaria

Yes I was. When you run sitl check the udp port mentioned in the --out parameter in mavproxy and see if they're matching with the ports you're connecting MAVROS to.

sacchinbhg commented 9 months ago

Thank you for this, was able to make it work!

Khalilmeister commented 3 months ago

can you please elaborate more

Anaskherro commented 2 months ago

I were you able to solve this issue? @AyushMaria

Yes I was. When you run sitl check the udp port mentioned in the --out parameter in mavproxy and see if they're matching with the ports you're connecting MAVROS to.

Can you please specify the steps that u followed to make this work ?