Jaeyoung-Lim / px4-offboard

Example of offboard control over microdds using python ROS 2
BSD 3-Clause "New" or "Revised" License
104 stars 51 forks source link

AttributeError: 'VehicleStatus' object has no attribute 'ARMING_STATE_DISARMED' #27

Closed Adeljc8 closed 2 weeks ago

Adeljc8 commented 1 month ago

Hello, Why am I getting this attribute error: self.arming_state = vehicle_status.ARMING_STATE_DISARMED AttributeError: 'VehicleStatus' object has no attribute 'ARMING_STATE_DISARMED'

Thank you in advance.

Jaeyoung-Lim commented 1 month ago

@Adeljc8 That is strange, since it exists: https://github.com/PX4/px4_msgs/blob/bd9dc0fae0162960a31af8f232a9e9f85522ae73/msg/VehicleStatus.msg#L9

ciresimo commented 2 weeks ago

Hey @Jaeyoung-Lim I tried to launch you example and got the same error I'm using PX4 main, should I revert to an older version?

Jaeyoung-Lim commented 2 weeks ago

@ciresimo This is not really related to the px4 version, but rather the px4_msgs you are using.(Which needs to be compatible with px4)

Could you check if the message field exists in the version you are using?

ciresimo commented 2 weeks ago

Ok solved it As suggested in px4_msgs repo I checked out to release/1.14 since I was using px4 1.14.3 It was my fault since I did not look at the readme I tried an it works fine also on main (both px4 and px4_msgs) so probably yesterday I did not fetch/pull something Thanks for the suggestion and for this cool example

Jaeyoung-Lim commented 2 weeks ago

@ciresimo Thanks for the update!