kdFlex 1.0.0 release

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 visuals to scene_parts in BodyDS as 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_view rather than const 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.getOptions method has been removed. These options can now be set at construction time and/or via getters/setters on the StatePropagator. See StatePropagator.getMaxStepTime as an example.
  • The fns member has moved from the StatePropagtor options to StatePropagator itself. 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 of kdFlex.
  • The CompoundBody.create method 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 SpringDamper model now uses a KModelScratch structure rather than using methods directly on the SpringDamper model. See SpringDamperScratch for details.
  • Renamed rates/omega conversions and associated maps to use same naming convention as other places in the codebase, e.g., omegaToRates rather than omega2rates. See UnitQuaternion.omegaToRates for details.
  • Renamed SpatialInertia.b2cm to SpatialInertial.bodyToCm. Member of other classes that reference b2cm are now body_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 dumpString method was added to the KModel base 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 collision tag has been added for URDFs. As a result, visual geometry is now placed in the layer LAYER_GRAPHICS while collision is now placed inthe layer LAYER_COLLISION. See BodyDS for details."
  • allDestroyed now ensures all Base objects are destoryed; it no longer ignores zombie objects, since zombies do not exist anymore. See allDestroyed for details.
  • Updated RegistryList to be only for classes that look Base-like. This means that they have an id(), name(), and typeString() method that match the expected signature. See RegistryList.h for details.
  • The StatePropagator advanceTo and advanceBy calls can now be made with an integer when used from Python. This allows one to use advanceTo(1) rather than having to do advanceTo(1.0). See StatePropagator.advanceTo for details.
  • Error messages have been added and improved throughout the codebase where asserts were previously located.
  • KModel dumpStrings have been added to the StatePropagator.dumpString. See StatePropagator::dumpString for details.
  • C++ examples have been added to the kdflex package. See the examples for details.
  • The KCore::Base::typeString has 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 typeString to get the correct type, it is done automatically. See KModel.typeString for details.
  • The StatePropagator.getStateFromModels has been renamed to StatePropagator.assembleState and the StatePropagator.setSTateFromModels method has been protected. See StatePropagator.assembleState for more details.
  • The SubTree methods dynamicsToState, dynamicsToStateDeriv, and stateToDynamics are now protected. Users should instead be using the following methods on the StatePropagator: assembleState, assembleStateDeriv and setState. See StatePropagator.assembleState, StatePropagator.assembleStateDeriv, and StatePropagator.setState for more details.
  • The StatePropagator has been modified to depend on the associated SubTree. This means that when the topology changes, the StatePropagator wiil reconfigure and reset its state to NaNs. As a result, whenever topology changes are made to the SubTree, one must also ensureCurrent() on the StatePropagator and call setState.
  • If the StatePropagator is using a SubGraph, it will default to using TREE_AUGMENTED_DYNAMICS as the solver type. Internally, StatePropagator now tracks the number of constraints on the SubGraph and 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 where dumpString would 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