forked from USC-ACTLab/crazyswarm
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add status topic #406
Merged
Merged
Add status topic #406
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
# Constants | ||
uint16 SUPERVISOR_INFO_CAN_BE_ARMED = 0 | ||
uint16 SUPERVISOR_INFO_IS_ARMED = 2 | ||
uint16 SUPERVISOR_INFO_AUTO_ARM = 4 | ||
uint16 SUPERVISOR_INFO_CAN_FLY = 8 | ||
uint16 SUPERVISOR_INFO_IS_FLYING = 16 | ||
uint16 SUPERVISOR_INFO_IS_TUMBLED = 32 | ||
uint16 SUPERVISOR_INFO_IS_LOCKED = 64 | ||
|
||
uint8 PM_STATE_BATTERY = 0 | ||
uint8 PM_STATE_CHARGING = 1 | ||
uint8 PM_STATE_CHARGED = 2 | ||
uint8 PM_STATE_LOW_POWER = 3 | ||
uint8 PM_STATE_SHUTDOWN = 4 | ||
|
||
std_msgs/Header header | ||
|
||
# general status | ||
uint16 supervisor_info # Bitfield, see SUPERVISOR_INFO for individual bits | ||
|
||
# battery related | ||
float32 battery_voltage # internal battery voltage [V] | ||
uint8 pm_state # See PM_STATE_* for potential values | ||
|
||
# radio related | ||
uint8 rssi # latest radio signal strength indicator [dBm] | ||
uint32 num_rx_broadcast # number of received broadcast packets during the last period | ||
uint32 num_tx_broadcast # number of broadcast packets sent during the last period | ||
uint32 num_rx_unicast # number of received unicast packets during the last period | ||
uint32 num_tx_unicast # number of unicast packets sent during the last period |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sack of 'easier understandability' I would say yes, but it might send the wrong message. Since there is no linear relationship between how fast discharging on the crazyflie or bigger bolt/BQ devices this might be tricky.... on the other hand, perhaps that won't be that much of a problem if the user is aware of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would the proper bolt support look like? We would either have "batteryLevel" or vbat and extvbat? Was there a reason why "pm.vbat" doesn't "point to" the external value on a bolt-based build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using BQ-deck one can actually have two batteries at the same time. On the Bolt this is also in some sense true but maybe not practical. It makes it a bit complicated and perhaps having one variable representing the "flying" battery level would be preferred.