mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
902 stars 993 forks source link

Mount Control : Getting error about can't subtract times with different time sources #1827

Open weicong96 opened 1 year ago

weicong96 commented 1 year ago

Issue details

Trying to get mavros working with a MAVLink supported Gimbal, was able to control the gimbal via "Payload Control" function on Mission Planner and see that it sends a MOUNT_CONTROL message.

I understand from reading the code for mount_control plugin that the equivalent implementation is the /mavros/mount_control/command topic. However get this error:

terminate called after throwing an instance of 'std::runtime_error' what(): can't subtract times with different time sources [2 != 1]

when trying to publish manually via command line or in my own Python ROS Node. Also noticed the mavros node crashes upon the error message above.

ros2 topic pub /mavros/mount_control/command mavros_msgs/msg/MountControl '{mode: 2, yaw: 4500}'

MAVROS version and platform

Mavros: 2.0.5 ROS: Galactic Ubuntu: 20.04

Autopilot type and version

[X] ArduPilot [ ] PX4

Version: 4.3.3

Node logs

Diagnostics

place here result of:
rostopic echo -n1 /diagnostics

Check ID

rosrun mavros checkid
vooon commented 1 year ago

It doesn't look that crash is in mount_control as it doesn't really have any rclcpp::Time or std::chrono. But i've googled few similar errors related to rclcpp.

Could you probably run the node under gdb (or use core dump) to trace where the trouble is?