Skip to content
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

Modular graphnav #6

Closed
wants to merge 81 commits into from
Closed

Modular graphnav #6

wants to merge 81 commits into from

Conversation

heuristicus
Copy link
Owner

No description provided.

jeremysee2 and others added 30 commits April 18, 2023 18:48
* use pytest instead

* add pytest dependency

* fail test on purpose

* remove failing test
* simple led brightness control, only able to set all leds to same value

* Add power control, but unclear if it is actually possible to set power for aux and external mic

* most basic functional image stream publisher with webrtc

* add compositor to handle IR and webrtc stream selection with services

Add timestamp for the webrtc images

Add compressed version of the webrtc image stream

* Add health wrapper, move body of robotToLocalTime out of spot wrapper object

robotToLocalTime now takes the timestamp and a robot object, which allows it to
be used by the spot cam wrapper as well.

* add handler and wrapper for audio commands

* update webrtc_client to 3.2 version

* add stream quality wrapper and ros handler

* initial implementation of ptz wrapper and handler, can list ptzs

* ptz handler publishes position and velocity of ptzs, can set position and velocity

* add egg info to gitignore
heuristicus and others added 20 commits June 26, 2023 17:22
* change the try-claim decorator to an object

* claim decorator takes functions it needs, no longer relies on power being decorated

Previously the claim decorator assumed that the power_on function was decorated with the same decorator. If power on was requested, the power on function would do the claiming, and then power on the system. That is kind of confusing, so now the decorator will call claim first, and then optionally power on.

Also takes the power on and claim functions, rather than calling the ones on the wrapper itself.

* formatting

* move decorator object to helper file, rename and make functions better, decorate docking functions

* formatting

* remove mistakenly merged robot command data and state

* decorate arm commands

* Fixed bugs with decorated functions

* black

---------

Co-authored-by: Andrew Messing <[email protected]>
Co-authored-by: Andrew Messing <[email protected]>
ko_tform_body=current_odom_tform_body,
)

def set_initial_localization_waypoint(self, *args):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplication as above

f"Got robot state in kinematic odometry frame: \n{str(odom_tform_body)}"
)

def set_initial_localization_fiducial(self, *args):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplication as above.

# Downloading, reproducing, distributing or otherwise using the SDK Software
# is subject to the terms and conditions of the Boston Dynamics Software
# Development Kit License (20191101-BDSDK-SL).
def _get_localization_state(self, *args):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function appears to be duplicated in wrapper.py

f.write(data)
f.close()

def _list_graph_waypoint_and_edge_ids(self, *args):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost exactly the same as the function in wrapper.py

"fiducial before attempting a navigation command."
)

def _navigate_to(self, waypoint_id: str) -> typing.Tuple[bool, str]:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, similar duplication in wrapper.py

f.write(data)
f.close()

def _download_graph_and_snapshots(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplication in wrapper.py

@heuristicus heuristicus closed this Aug 3, 2023
)
return True, "Success"

def clear_graph(self) -> typing.Tuple[bool, str]:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar function without the extra nested function call in wrapper.py

@heuristicus
Copy link
Owner Author

This was just a reference for me, please use bdaiinstitute#44 for comments.

f"Got an error while clearing a graph and snanshots in a robot: {e}",
)

def upload_graph(self, upload_path: str) -> typing.Tuple[bool, str]:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplication in wrapper.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants