Skip to content

Commit

Permalink
Jiminy release 1.8.8 (#827)
Browse files Browse the repository at this point in the history
* [core] Fix robot serialization issue. (#821)
* [core] Minor improvement periodic Perlin process and periodic stair ground. (#799) 
* [core] 'PeriodicGaussianProcess' and 'PeriodicFourierProcess' are now differentiable. (#799) 
* [core] Fix negative time support for all existing random processes. (#799) 
* [core] Add N-dimension Perlin processes. (#799) (#823) 
* [core] Add gradient computation for all Perlin processes. (#799) (#823) (#825)
* [core] Make all Perlin processes faster and copy-able. (#799) 
* [core] Add Perlin ground generators. (#799) 
* [core] Replace MurmurHash3 by xxHash32 which is faster. (#824) 
* [core] Make gradient computation optional for heightmap functions. (#824) 
* [jiminy_py] Fix 'tree.unflatten_as' mixing up key order for 'gym.spaces.Dict'. (#819)
* [python/simulator] Consistent keyword arguments between 'Simulator.build' and 'Simulator.add_robot'. (#821)
* [python/viewer] Fix MacOS support. (#822)
* [python/viewer] Add support of user-specified extra cameras (rgb and depth). (#826)
* [python/viewer] Significantly speed-up both offscreen and onscreen rendering for Panda3D. (#826)
* [gym/common] More generic stacking quantity. (#812) 
* [gym/common] Add termination condition abstraction. (#812) 
* [gym/common] Add quantity shift and drift tracking termination conditions. (#812) 
* [gym/common] Add support of termination composition in pipeline environments. (#812) 
* [gym/common] Add base roll/pitch termination condition. (#813) 
* [gym/common] Add base relative height termination condition. (#813) 
* [gym/common] Add foot collision termination condition. (#813) 
* [gym/common] More generic actuated joint kinematic quantity. (#814) 
* [gym/common] Add multi-ary operator quantity. (#814) 
* [gym/common] Add safety limits termination condition. (#814) 
* [gym/common] Add robot flying termination condition. (#815)
* [gym/common] Add power consumption termination condition. (#816) 
* [gym/common] Add ground impact force termination condition. (#816) 
* [gym/common] Add base odometry pose drift tracking  termination condition. (#817) 
* [gym/common] Add  motor positions shift tracking termination condition. (#817) 
* [gym/common] Add relative foot odometry pose shift tracking termination conditions. (#820)
* [gym/common] Add unit test checking that observation wrappers preserve key ordering. (#820)
* [gym/common] Fix quantity hash collision issue in quantity manager. (#821)
* [gym/common] Refactor quantity management to dramatically improve its performance. (#821)
* [gym/common] Add 'order' option to 'AdditiveReward'. (#821)
* [misc] Fix missing compositions documentation. (#812) 

---------

Co-authored-by: Mathias Wulfman <[email protected]>
  • Loading branch information
duburcqa and mwulfman authored Jul 17, 2024
1 parent 78d0195 commit e58bdb5
Show file tree
Hide file tree
Showing 65 changed files with 5,897 additions and 1,682 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.12.4)

# Set the build version (specify a tweak version to indicated post-release if needed)
set(BUILD_VERSION 1.8.7)
set(BUILD_VERSION 1.8.8)

# MSVC runtime library flags are defined by 'CMAKE_MSVC_RUNTIME_LIBRARY'
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15.7)
Expand Down
7 changes: 5 additions & 2 deletions core/include/jiminy/core/engine/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,13 @@ namespace jiminy
config["groundProfile"] = HeightmapFunction(
[](const Eigen::Vector2d & /* xy */,
double & height,
Eigen::Vector3d & normal) -> void
std::optional<Eigen::Ref<Eigen::Vector3d>> normal) -> void
{
height = 0.0;
normal = Eigen::Vector3d::UnitZ();
if (normal.has_value())
{
normal.value() = Eigen::Vector3d::UnitZ();
}
});

return config;
Expand Down
28 changes: 18 additions & 10 deletions core/include/jiminy/core/fwd.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#ifndef JIMINY_FORWARD_H
#define JIMINY_FORWARD_H

#include <string_view> // `std::string_view`
#include <cstdint> // `int32_t`, `int64_t`, `uint32_t`, `uint64_t`, ...
#include <functional> // `std::function`, `std::invoke`
#include <limits> // `std::numeric_limits`
#include <map> // `std::map`
#include <unordered_map> // `std::unordered_map`
#include <deque> // `std::deque`
#include <vector> // `std::vector`
#include <utility> // `std::pair`
#include <optional> // `std::optional`
#include <string> // `std::string`
#include <sstream> // `std::ostringstream`
#include <unordered_map> // `std::unordered_map`
#include <utility> // `std::pair`
#include <vector> // `std::vector`
#include <functional> // `std::function`, `std::invoke`
#include <limits> // `std::numeric_limits`
#include <memory> // `std::addressof`
#include <utility> // `std::forward`
#include <stdexcept> // `std::runtime_error`, `std::logic_error`
#include <stdexcept> // `std::logic_error`
#include <type_traits> // `std::enable_if_t`, `std::decay_t`, `std::add_pointer_t`, `std::is_same_v`, ...

#include "pinocchio/fwd.hpp" // To avoid having to include it everywhere
Expand Down Expand Up @@ -189,9 +189,17 @@ namespace jiminy
using std::logic_error::logic_error::what;
};

// Ground profile functors
using HeightmapFunction = std::function<void(
const Eigen::Vector2d & /* xy */, double & /* height */, Eigen::Vector3d & /* normal */)>;
template<typename ResultType,
ResultType min_ = std::numeric_limits<ResultType>::min(),
ResultType max_ = std::numeric_limits<ResultType>::max()>
class uniform_random_bit_generator_ref;

// Ground profile functors.
// FIXME: use `std::move_only_function` instead of `std::function` when moving to C++23
using HeightmapFunction =
std::function<void(const Eigen::Vector2d & /* xy */,
double & /* height */,
std::optional<Eigen::Ref<Eigen::Vector3d>> /* normal */)>;

// Flexible joints
struct FlexibilityJointConfig
Expand Down
3 changes: 2 additions & 1 deletion core/include/jiminy/core/robot/model.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#ifndef JIMINY_MODEL_H
#define JIMINY_MODEL_H

#include <optional>

#include "pinocchio/spatial/fwd.hpp" // `pinocchio::SE3`
#include "pinocchio/multibody/model.hpp" // `pinocchio::Model`
#include "pinocchio/multibody/data.hpp" // `pinocchio::Data`
#include "pinocchio/multibody/geometry.hpp" // `pinocchio::GeometryModel`, `pinocchio::GeometryData`
#include "pinocchio/multibody/frame.hpp" // `pinocchio::FrameType` (C-style enum cannot be forward declared)

#include "jiminy/core/fwd.h"
#include "jiminy/core/utilities/random.h" // `uniform_random_bit_generator_ref`


namespace jiminy
Expand Down
10 changes: 5 additions & 5 deletions core/include/jiminy/core/stepper/lie_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ namespace Eigen

#define StateDerivative_SHARED_ADDON \
template<typename Derived, \
typename = typename std::enable_if_t< \
typename = std::enable_if_t< \
is_base_of_template_v<StateDerivativeBase, \
typename internal::traits<Derived>::ValueType>::value, \
void>> \
Expand Down Expand Up @@ -1268,7 +1268,7 @@ namespace Eigen
template< \
typename Derived, \
typename OtherDerived, \
typename = typename std::enable_if_t< \
typename = std::enable_if_t< \
is_base_of_template_v<StateDerivativeBase, \
typename internal::traits<Derived>::ValueType>::value && \
is_base_of_template_v<StateBase, \
Expand All @@ -1290,7 +1290,7 @@ namespace Eigen
} \
\
template<typename Derived, \
typename = typename std::enable_if_t< \
typename = std::enable_if_t< \
is_base_of_template_v<StateDerivativeBase, \
typename internal::traits<Derived>::ValueType>::value, \
void>> \
Expand All @@ -1301,7 +1301,7 @@ namespace Eigen
} \
\
template<typename Derived, \
typename = typename std::enable_if_t< \
typename = std::enable_if_t< \
is_base_of_template_v<StateDerivativeBase, \
typename internal::traits<Derived>::ValueType>::value, \
void>> \
Expand All @@ -1320,7 +1320,7 @@ namespace Eigen
template< \
typename Derived, \
typename OtherDerived, \
typename = typename std::enable_if_t< \
typename = std::enable_if_t< \
is_base_of_template_v<StateBase, \
typename internal::traits<Derived>::ValueType>::value && \
is_base_of_template_v<StateDerivativeBase, \
Expand Down
17 changes: 16 additions & 1 deletion core/include/jiminy/core/utilities/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,23 @@ namespace jiminy
/// \param[in] stepHeight Heigh of the steps.
/// \param[in] stepNumber Number of steps in the ascending or descending direction.
/// \param[in] orientation Orientation of the staircases in the XY plane.
HeightmapFunction JIMINY_DLLAPI stairs(
HeightmapFunction JIMINY_DLLAPI periodicStairs(
double stepWidth, double stepHeight, uint32_t stepNumber, double orientation);

HeightmapFunction JIMINY_DLLAPI unidirectionalRandomPerlinGround(
double wavelength, std::size_t numOctaves, double orientation, uint32_t seed);

HeightmapFunction JIMINY_DLLAPI unidirectionalPeriodicPerlinGround(double wavelength,
double period,
std::size_t numOctaves,
double orientation,
uint32_t seed);

HeightmapFunction JIMINY_DLLAPI randomPerlinGround(
double wavelength, std::size_t numOctaves, uint32_t seed);

HeightmapFunction JIMINY_DLLAPI periodicPerlinGround(
double wavelength, double period, std::size_t numOctaves, uint32_t seed);
}

#endif // JIMINY_GEOMETRY_H
Loading

0 comments on commit e58bdb5

Please sign in to comment.