Skip to content

broccoli belstar v2.0.0

Ghost User requested to merge dev-v2 into belstar

Release of Broccoli belstar v2.0.0

New Features

  • [control]:
    • Added Signal class and operators for signal expressions
    • Added time-discrete IIR Filter implementation
    • IIR-based filters now support nth filter output derivative computation
    • Added essential feedback control patterns
    • Extended Wrench constructors
  • [core]:
    • Added type traits for initialization of complex data types with zero
    • floats.hpp now provides a new method isZero() for convenient and safe comparison to zero
    • Added functions to compute integer tuples for general Leibniz formula (derivative of a product of functions)
    • Added binomial and multimonial coefficient
    • PlatformHelper:
      • added functions waitFor(const uin64_t& seconds, const uint64_t& nanoSeconds) and waitFor(const timespec& duration) for precise sleeping
      • Added method to identify byte-order (endianness) at runtime.
    • Time: now uses new waitFor with nanosecond precision. This also fixes a bug with delays > 1s
    • Added string.hpp for common string operations not covered by the stdlib.
    • Computation of multinomialCoefficient now takes a SmartVector as input to avoids dynamic memory allocation
  • [curve]:
    • Implemented numeric derivatives for all curves and quaternion curves
    • Implemented (dummy) high-performance evaluation functions (D0D1 and D0D1D2) for all curves and quaternion curves. For curves and quaternion curves where an analytic derivative is known, these functions are overwritten by efficient implementations which reuse intermediate results.
    • Implemented BSplineBasis, BSplineBasisSample and CumulativeBSplineBasisSample as background for quaternion B-spline curves (may be used for euclidean B-spline curves in future as well).
    • New quaternion curves and interpolation methods: LERP, NLERP, Bezier, SQUAD and BSpline
    • Refactored BSplineBasis, BSplineBasisSample, CumulativeBSplineBasisSample and QuaternionBSplineCurve to make use of SmartVector (to avoid dynamic memory allocation while still implementing the most general case)
  • [memory]:
    • Adds CircularAccessor to view linear data structures as circular data
    • Added SmartVector class as hybrid implementation of std::array and std::vector (uses a pre-allocated stack buffer for efficiency and a dynamically allocated heap buffer to extend the stack buffer (for flexibility)).
  • [parallel]:
    • BackgroundWorker:
      • now uses Time::sleep for sleeping
      • Added methods waitForSynchronization(timeout) and triggerSynchronization()
  • [io/logging]:
    • Refactored the interface of ColumnBasedLogFileData: The new ColumnBasedLogStream allows easy definition of data and header name in one place
    • Added possibility to set column name prefix in ColumnBasedLogStream
    • Added getter for log time in TemporalLogFileData
    • LogFile: Added file attributes, which may be used to store custom global data in log file headers / footers. This replaces the default log header implementation.
    • Logging: added XMLBasedLogFileData and corresponding unit-test
    • ColumnBasedLogStream
      • added getter function generateColumnNames() (allows to distinguish between header and data when encoding data)
      • added support for eigen quaternions
    • encoding
      • added methods to encode and decode arrays, vectors, eigen matrices and eigen quaternions
      • Now supports encoding and decoding of SmartVector containers
      • Now supports encoding and decoding of generic Eigen::QuaternionBase (arbitrary scalar type)
    • serialization
      • Now supports serialization and deserialization of std::vector, SmartVector, Eigen::MatrixBase and Eigen::QuaternionBase types
    • SerializableData
      • Added support for serialize(SerializableData) and deSerialize(SerializableData). This allows embedded SerializableData-objects in containers like arrays or vectors.
    • NetworkSocket
      • Now supports messages >4kB for TCP connections (theoretical maximum is now 4GB)
      • Now avoids overflow of TCP and UDP socket buffers (handled by OS kernel)
      • Improved error handling for sending and receiving messages
      • Improved constructor by dedicated container for options
    • Added namespace ply and related classes for reading and writing .ply files (ascii, binary-little-endian, binary-big-endian) and converting to/from CGMesh.
    • serialization: Now supports to serialize/deserialize parameter tuples (through variadic templates). This should significantly ease writing serialization and deserialization code for custom classes.
  • [geometry]:
    • Added quaternion and rotation related methods to geometry/rotations. Adds a custom implementation of SLERP
      • In contrast to Eigen's version this function allows the user to specify if the keyframe quaternions should be flipped (q -> -q) such that the result describes the shortest path on the unit sphere. In some cases (e.g. for quaternion Bezier and SQUAD curves we do not want the shortest distance, since this represents a (discontinuous) switching, which in turn breaks C1-continuity of Bezier and SQUAD).
    • Added classes CGMaterial and CGMesh as containers for typical material and mesh data structures in Computer Graphics. CGMesh supports indexed vertex data, per-vertex normals and colors (rgba, 24+8bit), methods for merging, normal averaging, householding, and material to vertex color conversions.

Bug Fixes

  • [control]: GaussianNoise is now truely deterministic
  • [core]:
    • (Uncritical) math::factorial: In case of an overflow now returns "1" instead of "0" (to prevent division by zero in typical applications)
    • (Uncritical) Improved overflow handling in computation of Faa di Bruno tuples
    • PlatformHelper::waitFor/Time:sleep: Delays greater than one second were not executed properly on ALL platforms
  • [curve]:
    • removed virtual tag from BSplineBasis::setClampedUniformKnots() and BSplineBasisSample::evaluateX() since they are called in the constructors
  • [geometry]: quaternionNaturalLogarithm now returns a correct result for all quadrants and uses a taylor series approximation for small angle
  • [io]:
    • LogFile:
      • Added methods to increment the counters for the total received and written objects. This allows to prevent a possible race condition.
    • TCPClientOptions: removed argument ownPort from constructor
  • [parallel]:
    • Changed behavior of BackgroundWorker in single-threaded case: now start() does not trigger an execution cycle (by triggerManualExecution) anymore. This way the user has more control, since one can choose to call triggerManualExecution after start().
    • Updated corresponding unit-test

Non-Breaking Changes

  • [core]:
    • PlatformHelpers: fixed small bug in comment (namespace transfer from am2b to broccoli)
  • [curve]:
    • Minor performance improvements in curve-module (mainly functions related to evaluation)
    • QuaternionBSplineCurve now internally uses SmartVector for evaluation (increases performance). However, the interface remains the same.
    • Added PolynomialSplineSplitter and PolynomialTrajectorySplitter classes for improved convenience
  • [documentation]:
    • Minor improvements in documentation (mainly core and curve module)
  • [io]:
    • encoding: Added explicit support for basic datatypes. Resolves ambiguities (char <-> uint8_t, float <-> double, etc.)
  • [toolchain]:
    • Broccoli now uses the C++14 standard, effectively dropping support for QNX Neutrino < 7.0
    • Improved doxygen layout to support module descriptions
    • Added Dockerfile for build container to tools/
    • Added pre-commit hook script for clang-format to tools/
    • Updated CI pipeline with parallel builds
    • Added compiler flag -Wno-deprecated-copy for GCC and Clang to silence annoying warning about Eigen-code in Clang 10.
  • [memory]:
    • CircularBuffer::pop(std::vector<T>, size_t) now tries to reserve memory for the vector of target elements in advance (to reduce the time of locked buffer)
    • Minor clean-up of documentation of CircularBuffer

Breaking Changes

  • [control]:
    • Reimplemented filters, operators, sources and kinematics to use the Signal API
    • Moved LinearFader to operators and redesigned its API
    • Moved StatisticsEstimator to core module
    • Removed ActivatableModule
    • Moved Wrench and SignalLimits to control main folder
    • SignalLimits now only stores min/max values
  • [core]:
    • Moved existing quaternion-related methods to geometry/rotations.hpp
    • The methods in floats.hpp are no longer in a separate namespace. Furthermore, floats.hpp is no longer required by math.hpp
    • Removed waitForAccurate() from PlatformHelper. This is too specialized for a general implementation
    • math::faaDiBrunoTuples and math::generalLeibnizTuples now use SmartVector as output for better performance in most cases.
  • [curve]:
    • Quaternion curves are now derived either from QuaternionCurveFixedSize (fixed count of control point quaternions) or QuaternionCurveDynamicSize (dynamic count of control point quaternions).
    • Restructured inheritance hierarchy of (euclidean/quaternion) curves, splines and trajectories: now each curve type got its own derived spline and trajectory.
    • Splitted interpolate functions into more granular protected functions (to improve readability - API not affected)
    • Complete overhaul of unit-tests for curve-module (to fit new inheritance hierarchy and to cover more functions/cases)
    • Changed encoding to new methods for arrays, vectors eigen matrices and eigen quaternions (Warning: some delimiters ',' or ';' may have switched in the new output)
  • [io]:
    • LogFile:
      • Now starts skipping with the second received object (not the first one).
    • Moved all column-based logging related stuff to ColumnBasedLogFileData
    • Removed unused return value of the encode methods
    • serialization:
      • Changed syntax from serializeArray() to serialize() and deSerializeArray() to deSerialize()
      • Changed syntax from serializeString() to serialize() and deSerializeString() to deSerialize()
      • Moved SerializableData into serialization.hpp (and namespace serialization). This is necessary to allow automatic serialization of containers like array, vector, SmartVector with the element type SerializableData
      • Changed syntax from serialize(stream, stream) to append(stream, stream) to avoid ambiguity with serialization of an std::vector<uint8_t>
    • NetworkSocket
      • Constructor now expects a container of options (NetworkSocketOptions or the derived specializations TCPServerOptions, TCPClientOptions, UDPSocketOptions)
    • serialization: Now explicitly requires the user to specify the "endianess" (big-/little-endian). This allows the user to choose the byte-order for serialization.
    • NetworkSocket: The network socket now has an option to specify the used byte-order for serialization and deserialization. The socket uses "little-endian" per default, however, the user may explicitly force it to big-endian (e.g. for communicating with embedded devices).
  • [parallel]:
    • BackgroundWorker now uses PlatformHelper to set thread priority also on Linux and Mac.
  • [geometry]:
    • The Polygon2D class now uses the new SmartVector for the list of vertices. Polygon2D thus is now a template class. This way we can avoid memory fragmentation through allocating many small Eigen::Vector2D elements on the heap (if we know the maximum vertex count at compile time).
    • The XML encoding of the Polygon2D class now uses the correct tag Polygon2D instead of Polygon.
    • Changed encoding to new methods for arrays, vectors eigen matrices and eigen quaternions (Warning: some delimiters ',' or ';' may have switched in the new output)
Edited by Ghost User

Merge request reports