Skip to content

Split controller into webstack#1

Open
hemangandhi wants to merge 604 commits intomasterfrom
split-controller-into-webstack
Open

Split controller into webstack#1
hemangandhi wants to merge 604 commits intomasterfrom
split-controller-into-webstack

Conversation

@hemangandhi
Copy link
Copy Markdown
Collaborator

This is for demonstration purposes; mostly. But I actually think this is close to feasible. I have to fix a few things:

  • master is a subset of controllerclientcpp; I might want to make it the full thing first.
  • Some of the libraries (mujinjson, mujinexceptions) will move to planning, so will be deletions instead of diffs here.
  • I should figure out how to get the diff of controllerclient.h and controllerclientimpl.cpp to pair with webstackclient.h and webstackclient.cpp (I forgot that I removed the virtual base class here).

ziyan and others added 30 commits March 1, 2019 10:22
Implement ModifySceneAddReferenceObjectPK and ModifySceneRemoveRefere…
Implement ModifySceneAddReferenceObjectPK and ModifySceneRemoveRefere…
heman.gandhi and others added 28 commits July 21, 2023 10:11
The controller common utilities only need the webstack client.

Note: for now, createwebstackclient.h provides an alias for the
controllerclient since call sites expect that. This alias may
CAUSE ODR VIOLATIONS. Well... suffer the wrath of multiple repos.
This alias will be removed after callers have migrated.

Also (side-note, mostly for my own sanity): the mujinzmq exception
details have been tweaked so that we don't have to keep an enum
consistent between controller common and the planning client. In
particular, an instance of MEC_timeout has become MCCE_failed.
There's arguments that all the MEC_ errors in mujinzmq should
actually be MCCE_ZmqError, but this is hopefully extremely minor.
createwebstackclient needed some care to build in its new home.
In particular: its function name was colliding with the basic
creator in webstackclient.h, and it needed the MUJINWEBSTACKCLIENT_API
attribute.

Mujin definitions is removed -- its not needed for webstack and
planning client provides it.

Mujin JSON too has been superceeded by its planning client counterpart,
if both are included (as they are in the vision manager, through a myriad
of inclusion paths). Some spooky action at a distance: we inherit from
MujinControllerCommonException if there is an inclusion path that includes
controller common's mujinjson.
TODO(document/team#86): fix this (or document it). It's better to define what class
mujinjson::MujinJSONException should inherit from as the macro than just
replacing the class. This can also ensure that mujinjsonwebstack::MujinJSONException
is always a std::exception (which might be better).
…ntroller-into-webstack

This is to preserve the history of the ControllerClientInfo class.
…roller-into-webstack

This is to preserve the history of _ParseClientInfoFromUrl, which will be exposed
as a static factory functio inside the WebstackClientInfo (so that createwebstackclient
can reuse the URL parsing logic).
The idea is that if mujinjson::MujinJSONExceptionInternal (from
controller common) is defined, we use that. The typedef is there
to handle the discrpancy in the namespace. This is done so that you
can catch any JSON exception in one catch.
Also add some logging because I'm losing my mind a little.
…5c7dc334368c00250bf9b03068a6517f37

This makes it so getting JSON from HTTP GETs and POSTs do not clear
the allocators of the caller-provided documents.
@hemangandhi hemangandhi requested a review from felixvd August 23, 2023 09:54
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.

5 participants