mavlink / mavros

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

MAVROS FTP read from PX4 1.14.1 always return 0 length data. #1928

Open oldshuren opened 5 months ago

oldshuren commented 5 months ago

This is only bug and feature tracker, please use it to report bugs or request features.


Issue details

mavros ftp READ always read 0 length

MAVROS version and platform

Mavros: latest ROS: noetic Ubuntu: 20.4

Autopilot type and version

[ ] ArduPilot [ X ] PX4

Version: 1.14.1

Node logs

Diagnostics

In mavros/src/plugins/ftp.cpp send_read_command() it has,
req.header()->size = 0 /* FTPRequest::DATA_MAXSZ */;

But the px4 mavlink_ftp.cpp changed from

int bytes_read = ::read(_session_info.fd, &payload->data[0], kMaxDataLength);

to

int bytes_read = ::read(_session_info.fd, &payload->data[0], payload->size);

So FTP read always return 0 length on px4 1.14.1

Check ID