kdFlex 1.0.0 Code Changes Summary
API Changes
- Renamed webscene-frontend to karana-webui. This is the name of the application which is typically launched automatically by WebUI.Server.launchLocalClient.
- Removed the show-mesh utility.
- Now Jacobian class constructors take a single CoordData argument instead of a list. docs
- Now toPhysicalHinge() discards the loop constraint being converted. docs
- Now SubTree::getBody() returns nullptr if there is no match. docs
- Renamed SubTree::containsBody() to hasBody(). New containsBody() looks through nested hierarchy of subtrees docs
- Renamed SubTree bodiesList() method to sortedBodiesList(). docs
- Renamed SubTree physicalBodiesList() method to sortedPhysicalBodiesList(). docs
- Renamed
visualstoscene_partsinBodyDSas this is a more approprate name. See BodyDS for details. - The notion of zombie
LockingBases has been removed along with associated methods, as they are no longer needed due to other internal changes. - Updated to use
std::string_viewrather thanconst std::string&for constructors,name(),typeString()and other methods. See Karana::Core::Base::typeString as an example. - Updated class, method, enum, function, and argument names to follow the same convention: UpperCamelCase for clases and enums, lowerCamelCase for functions and methods, snake_case for class members and arguments, and UPPER_SNAKE_CASE for enum names. See Karana.Core.LogLevel as an example.
- The
StatePropagator.getOptionsmethod has been removed. These options can now be set at construction time and/or via getters/setters on theStatePropagator. See StatePropagator.getMaxStepTime as an example. - The
fnsmember has moved from theStatePropagtoroptions toStatePropagatoritself. This makes it easier to find and access. See StatePropagtor.fns for details. - The apparent mass body type (
PhysicalApparentMass) and associated objects have been removed from personal and professional tiers ofkdFlex. - The
CompoundBody.createmethod has been updated so that the name is the first argument. This matches the other create methods in kdFlex. See CompoundBody.create for details. - The
SpringDampermodel now uses aKModelScratchstructure rather than using methods directly on theSpringDampermodel. See SpringDamperScratch for details. - Renamed rates/omega conversions and associated maps to use same naming convention as other places in the codebase, e.g.,
omegaToRatesrather thanomega2rates. See UnitQuaternion.omegaToRates for details. - Renamed
SpatialInertia.b2cmtoSpatialInertial.bodyToCm. Member of other classes that referenceb2cmare nowbody_to_cm, e.g.,BodyDS.body_to_cm. See SpatialInertial.bodyToCm for more details.
New Features
- Added Karana.Scene.ProxyScene.viewAroundFrame. See the API docs for details.
- Added collision filtering via FrameCollider.ignoreFramePair and FrameCollider.ignoreAllCurrentlyTouchingPairs. See the frame collider docs for details.
- Added Karana.KUtils.ros.EasyPubSub to simplify ROS interfacing as part of the simulation loop. See the API reference and an example notebook for details.
- Added SubTree dumpDynamics method and enable_dump_dynamics member that prints out raw tree dynamics input and output values. Updated Algorithms::evalTreeForwardDynamics, evalTAForwardDynamics and StatePropagator to call dumpDynamics if it is enabled. docs
- A
dumpStringmethod was added to theKModelbase classes (C++ and Python), that automatically calls out to the associated KModel structures (params, scratch, discrete states, and continuous states) if appropriate. See the KModel debugging section for details.
Enhancements
- Add a GraphicalScene.defaultCamera getter method
- Add manager tracking and lookup for Scene and SceneNode.
- ProxyScene and ProxySceneNode automatically add self as manager to clients.
- Made KUtils.visjs, KUtils.DataPlotter, and WebUI.Server startup messages more uniform and verbose so that they are harder to miss.
- Improved error messages on KUtils.visjs, KUtils.DataPlotter, and WebUI.Server startup when the requested port is in use.
- Support for the
collisiontag has been added for URDFs. As a result,visualgeometry is now placed in the layerLAYER_GRAPHICSwhilecollisionis now placed inthe layerLAYER_COLLISION. See BodyDS for details." allDestroyednow ensures all Base objects are destoryed; it no longer ignores zombie objects, since zombies do not exist anymore. See allDestroyed for details.- Updated
RegistryListto be only for classes that lookBase-like. This means that they have anid(),name(), andtypeString()method that match the expected signature. See RegistryList.h for details. - The
StatePropagatoradvanceToandadvanceBycalls can now be made with an integer when used from Python. This allows one to useadvanceTo(1)rather than having to doadvanceTo(1.0). See StatePropagator.advanceTo for details. - Error messages have been added and improved throughout the codebase where
assertswere previously located. - KModel
dumpStrings have been added to theStatePropagator.dumpString. See StatePropagator::dumpString for details. - C++ examples have been added to the kdflex package. See the examples for details.
- The
KCore::Base::typeStringhas been updated to print out the type of the current class. This largely prevents derived classes from needed to define a typeString. See KCore::Base::typeString for details. - Python KModels have beeen modified so that the base class prints the correct typeString. This makes it so derived Python KModels no longer need to override the
typeStringto get the correct type, it is done automatically. See KModel.typeString for details. - The
StatePropagator.getStateFromModelshas been renamed toStatePropagator.assembleStateand theStatePropagator.setSTateFromModelsmethod has been protected. See StatePropagator.assembleState for more details. - The
SubTreemethodsdynamicsToState,dynamicsToStateDeriv, andstateToDynamicsare now protected. Users should instead be using the following methods on theStatePropagator:assembleState,assembleStateDerivandsetState. See StatePropagator.assembleState, StatePropagator.assembleStateDeriv, and StatePropagator.setState for more details. - The
StatePropagatorhas been modified to depend on the associatedSubTree. This means that when the topology changes, theStatePropagatorwiil reconfigure and reset its state to NaNs. As a result, whenever topology changes are made to theSubTree, one must alsoensureCurrent()on theStatePropagatorand callsetState. - If the
StatePropagatoris using aSubGraph, it will default to usingTREE_AUGMENTED_DYNAMICSas the solver type. Internally,StatePropagatornow tracks the number of constraints on theSubGraphand calls tree forward dynamics or tree augmented forward dynamics appropriately.
Bug Fixes
- Fixed a use-after-free in WebScene overlay text setters such as setOverlayText.
- Fixed a hang if the web server fails to start up in KUtils.visjs.
- Fixed a hang if the web server fails to start up in KUtils.DataPlotter.
- Fixed bug with Python bindings for
StatePropagror.derivFunction. This now returns the derivatives at the Python level as intended; previously, these values were not being pushed into the dx vector correctly. See StatePropagator.derivFunction for details. - Fixed bug where a few, typically unused, members were not being copied over correctly in IntegratorOptions’ copy constructors and assignment operators.
- Fixed bug with Python
KModels wheredumpStringwould not always override as intended in all cases. - Fixed missing rotation in subhinge jacobianDot method
“We’re out of beta, We’re releasing on time” - GLaDOS