Skip to content

Commit

Permalink
capitalize class and file names
Browse files Browse the repository at this point in the history
  • Loading branch information
evelyd committed Sep 24, 2024
1 parent 8bf5fe2 commit 7f2fe11
Show file tree
Hide file tree
Showing 21 changed files with 350 additions and 352 deletions.
16 changes: 8 additions & 8 deletions bindings/python/ML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ if(TARGET BipedalLocomotion::ML)

add_bipedal_locomotion_python_module(
NAME MLBindings
SOURCES src/Module.cpp src/MANN.cpp src/velMANN.cpp
src/MANNAutoregressive.cpp src/velMANNAutoregressive.cpp
src/MANNTrajectoryGenerator.cpp src/velMANNTrajectoryGenerator.cpp
src/MANNAutoregressiveInputBuilder.cpp src/velMANNAutoregressiveInputBuilder.cpp
HEADERS ${H_PREFIX}/Module.h ${H_PREFIX}/MANN.h ${H_PREFIX}/velMANN.h
${H_PREFIX}/MANNAutoregressive.h ${H_PREFIX}/velMANNAutoregressive.h
${H_PREFIX}/MANNTrajectoryGenerator.h ${H_PREFIX}/velMANNTrajectoryGenerator.h
${H_PREFIX}/MANNAutoregressiveInputBuilder.h ${H_PREFIX}/velMANNAutoregressiveInputBuilder.h
SOURCES src/Module.cpp src/MANN.cpp src/VelMANN.cpp
src/MANNAutoregressive.cpp src/VelMANNAutoregressive.cpp
src/MANNTrajectoryGenerator.cpp src/VelMANNTrajectoryGenerator.cpp
src/MANNAutoregressiveInputBuilder.cpp src/VelMANNAutoregressiveInputBuilder.cpp
HEADERS ${H_PREFIX}/Module.h ${H_PREFIX}/MANN.h ${H_PREFIX}/VelMANN.h
${H_PREFIX}/MANNAutoregressive.h ${H_PREFIX}/VelMANNAutoregressive.h
${H_PREFIX}/MANNTrajectoryGenerator.h ${H_PREFIX}/VelMANNTrajectoryGenerator.h
${H_PREFIX}/MANNAutoregressiveInputBuilder.h ${H_PREFIX}/VelMANNAutoregressiveInputBuilder.h
LINK_LIBRARIES BipedalLocomotion::ML
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file velMANN.h
* @file VelMANN.h
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file velMANNAutoregressive.h
* @file VelMANNAutoregressive.h
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* @file velMANNAutoregressiveInputBuilder.h
* @file VelMANNAutoregressiveInputBuilder.h
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* @file velMANNTrajectoryGenerator.h
* @file VelMANNTrajectoryGenerator.h
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand Down
8 changes: 4 additions & 4 deletions bindings/python/ML/src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include <BipedalLocomotion/bindings/ML/MANNAutoregressive.h>
#include <BipedalLocomotion/bindings/ML/MANNTrajectoryGenerator.h>
#include <BipedalLocomotion/bindings/ML/MANNAutoregressiveInputBuilder.h>
#include <BipedalLocomotion/bindings/ML/velMANN.h>
#include <BipedalLocomotion/bindings/ML/velMANNAutoregressive.h>
#include <BipedalLocomotion/bindings/ML/velMANNTrajectoryGenerator.h>
#include <BipedalLocomotion/bindings/ML/velMANNAutoregressiveInputBuilder.h>
#include <BipedalLocomotion/bindings/ML/VelMANN.h>
#include <BipedalLocomotion/bindings/ML/VelMANNAutoregressive.h>
#include <BipedalLocomotion/bindings/ML/VelMANNTrajectoryGenerator.h>
#include <BipedalLocomotion/bindings/ML/VelMANNAutoregressiveInputBuilder.h>


namespace BipedalLocomotion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file velMANN.cpp
* @file VelMANN.cpp
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand All @@ -9,9 +9,9 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <BipedalLocomotion/ML/velMANN.h>
#include <BipedalLocomotion/ML/VelMANN.h>

#include <BipedalLocomotion/bindings/ML/velMANN.h>
#include <BipedalLocomotion/bindings/ML/VelMANN.h>
#include <BipedalLocomotion/bindings/System/Advanceable.h>

namespace BipedalLocomotion
Expand All @@ -27,25 +27,25 @@ void CreateVelMANN(pybind11::module& module)
namespace ML = BipedalLocomotion::ML;
namespace System = BipedalLocomotion::System;

py::class_<ML::velMANNInput>(module, "velMANNInput")
py::class_<ML::VelMANNInput>(module, "VelMANNInput")
.def(py::init())
.def_readwrite("base_linear_velocity_trajectory", &ML::velMANNInput::baseLinearVelocityTrajectory)
.def_readwrite("base_angular_velocity_trajectory", &ML::velMANNInput::baseAngularVelocityTrajectory)
.def_readwrite("joint_positions", &ML::velMANNInput::jointPositions)
.def_readwrite("joint_velocities", &ML::velMANNInput::jointVelocities);
.def_readwrite("base_linear_velocity_trajectory", &ML::VelMANNInput::baseLinearVelocityTrajectory)
.def_readwrite("base_angular_velocity_trajectory", &ML::VelMANNInput::baseAngularVelocityTrajectory)
.def_readwrite("joint_positions", &ML::VelMANNInput::jointPositions)
.def_readwrite("joint_velocities", &ML::VelMANNInput::jointVelocities);

py::class_<ML::velMANNOutput>(module, "velMANNOutput")
py::class_<ML::VelMANNOutput>(module, "VelMANNOutput")
.def(py::init())
.def_readwrite("future_base_linear_velocity_trajectory",
&ML::velMANNOutput::futureBaseLinearVelocityTrajectory)
&ML::VelMANNOutput::futureBaseLinearVelocityTrajectory)
.def_readwrite("future_base_angular_velocity_trajectory",
&ML::velMANNOutput::futureBaseAngularVelocityTrajectory)
.def_readwrite("joint_positions", &ML::velMANNOutput::jointPositions)
.def_readwrite("joint_velocities", &ML::velMANNOutput::jointVelocities);
&ML::VelMANNOutput::futureBaseAngularVelocityTrajectory)
.def_readwrite("joint_positions", &ML::VelMANNOutput::jointPositions)
.def_readwrite("joint_velocities", &ML::VelMANNOutput::jointVelocities);

BipedalLocomotion::bindings::System::CreateAdvanceable<ML::velMANNInput, //
ML::velMANNOutput>(module, "velMANN");
py::class_<ML::velMANN, System::Advanceable<ML::velMANNInput, ML::velMANNOutput>>(module, "velMANN")
BipedalLocomotion::bindings::System::CreateAdvanceable<ML::VelMANNInput, //
ML::VelMANNOutput>(module, "VelMANN");
py::class_<ML::VelMANN, System::Advanceable<ML::VelMANNInput, ML::VelMANNOutput>>(module, "VelMANN")
.def(py::init());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file velMANNAutoregressive.cpp
* @file VelMANNAutoregressive.cpp
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand All @@ -10,8 +10,8 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <BipedalLocomotion/ML/velMANNAutoregressive.h>
#include <BipedalLocomotion/bindings/ML/velMANNAutoregressive.h>
#include <BipedalLocomotion/ML/VelMANNAutoregressive.h>
#include <BipedalLocomotion/bindings/ML/VelMANNAutoregressive.h>
#include <BipedalLocomotion/bindings/System/Advanceable.h>
#include <BipedalLocomotion/bindings/type_caster/swig.h>

Expand All @@ -28,43 +28,43 @@ void CreateVelMANNAutoregressive(pybind11::module& module)
namespace ML = BipedalLocomotion::ML;
namespace System = BipedalLocomotion::System;

py::class_<ML::velMANNAutoregressiveInput>(module, "velMANNAutoregressiveInput")
py::class_<ML::VelMANNAutoregressiveInput>(module, "VelMANNAutoregressiveInput")
.def(py::init())
.def_readwrite("desired_future_base_trajectory",
&ML::velMANNAutoregressiveInput::desiredFutureBaseTrajectory)
&ML::VelMANNAutoregressiveInput::desiredFutureBaseTrajectory)
.def_readwrite("desired_future_base_directions",
&ML::velMANNAutoregressiveInput::desiredFutureBaseDirections)
&ML::VelMANNAutoregressiveInput::desiredFutureBaseDirections)
.def_readwrite("desired_future_base_velocities",
&ML::velMANNAutoregressiveInput::desiredFutureBaseVelocities)
&ML::VelMANNAutoregressiveInput::desiredFutureBaseVelocities)
.def_readwrite("desired_future_base_angular_velocities",
&ML::velMANNAutoregressiveInput::desiredFutureBaseAngVelocities);
&ML::VelMANNAutoregressiveInput::desiredFutureBaseAngVelocities);

py::class_<ML::velMANNAutoregressiveOutput>(module, "velMANNAutoregressiveOutput")
py::class_<ML::VelMANNAutoregressiveOutput>(module, "VelMANNAutoregressiveOutput")
.def(py::init())
.def_readwrite("joint_positions", &ML::velMANNAutoregressiveOutput::jointsPosition)
.def_readwrite("joint_velocities", &ML::velMANNAutoregressiveOutput::jointsVelocity)
.def_readwrite("base_pose", &ML::velMANNAutoregressiveOutput::basePose)
.def_readwrite("base_velocity", &ML::velMANNAutoregressiveOutput::baseVelocity)
.def_readwrite("left_foot_pose", &ML::velMANNAutoregressiveOutput::leftFootPose)
.def_readwrite("right_foot_pose", &ML::velMANNAutoregressiveOutput::rightFootPose)
.def_readwrite("left_foot_velocity", &ML::velMANNAutoregressiveOutput::leftFootVelocity)
.def_readwrite("right_foot_velocity", &ML::velMANNAutoregressiveOutput::rightFootVelocity)
.def_readwrite("left_foot", &ML::velMANNAutoregressiveOutput::leftFoot)
.def_readwrite("right_foot", &ML::velMANNAutoregressiveOutput::rightFoot);
.def_readwrite("joint_positions", &ML::VelMANNAutoregressiveOutput::jointsPosition)
.def_readwrite("joint_velocities", &ML::VelMANNAutoregressiveOutput::jointsVelocity)
.def_readwrite("base_pose", &ML::VelMANNAutoregressiveOutput::basePose)
.def_readwrite("base_velocity", &ML::VelMANNAutoregressiveOutput::baseVelocity)
.def_readwrite("left_foot_pose", &ML::VelMANNAutoregressiveOutput::leftFootPose)
.def_readwrite("right_foot_pose", &ML::VelMANNAutoregressiveOutput::rightFootPose)
.def_readwrite("left_foot_velocity", &ML::VelMANNAutoregressiveOutput::leftFootVelocity)
.def_readwrite("right_foot_velocity", &ML::VelMANNAutoregressiveOutput::rightFootVelocity)
.def_readwrite("left_foot", &ML::VelMANNAutoregressiveOutput::leftFoot)
.def_readwrite("right_foot", &ML::VelMANNAutoregressiveOutput::rightFoot);

BipedalLocomotion::bindings::System::CreateAdvanceable<ML::velMANNAutoregressiveInput, //
ML::velMANNAutoregressiveOutput> //
(module, "velMANNAutoregressive");
py::class_<ML::velMANNAutoregressive,
System::Advanceable<ML::velMANNAutoregressiveInput, //
ML::velMANNAutoregressiveOutput>>(module, "velMANNAutoregressive")
BipedalLocomotion::bindings::System::CreateAdvanceable<ML::VelMANNAutoregressiveInput, //
ML::VelMANNAutoregressiveOutput> //
(module, "VelMANNAutoregressive");
py::class_<ML::VelMANNAutoregressive,
System::Advanceable<ML::VelMANNAutoregressiveInput, //
ML::VelMANNAutoregressiveOutput>>(module, "VelMANNAutoregressive")
.def(py::init())
.def("reset",
py::overload_cast<Eigen::Ref<const Eigen::VectorXd>, const manif::SE3d&>(
&ML::velMANNAutoregressive::reset),
&ML::VelMANNAutoregressive::reset),
py::arg("joint_positions"),
py::arg("base_pose"))
.def("set_robot_model", [](ML::velMANNAutoregressive& impl, ::pybind11::object& obj) {
.def("set_robot_model", [](ML::VelMANNAutoregressive& impl, ::pybind11::object& obj) {
iDynTree::Model* cls = py::detail::swig_wrapped_pointer_to_pybind<iDynTree::Model>(obj);

if (cls == nullptr)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file velMANNAutoregressiveInputBuilder.cpp
* @file VelMANNAutoregressiveInputBuilder.cpp
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand All @@ -11,8 +11,8 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <BipedalLocomotion/ML/velMANNAutoregressiveInputBuilder.h>
#include <BipedalLocomotion/bindings/ML/velMANNAutoregressiveInputBuilder.h>
#include <BipedalLocomotion/ML/VelMANNAutoregressiveInputBuilder.h>
#include <BipedalLocomotion/bindings/ML/VelMANNAutoregressiveInputBuilder.h>
#include <BipedalLocomotion/bindings/System/Advanceable.h>
#include <BipedalLocomotion/bindings/type_caster/swig.h>

Expand All @@ -29,18 +29,18 @@ void CreateVelMANNAutoregressiveInputBuilder(pybind11::module& module)
namespace ML = BipedalLocomotion::ML;
namespace System = BipedalLocomotion::System;

py::class_<ML::velMANNDirectionalInput>(module, "velMANNDirectionalInput")
py::class_<ML::VelMANNDirectionalInput>(module, "VelMANNDirectionalInput")
.def(py::init())
.def_readwrite("motion_direction", &ML::velMANNDirectionalInput::motionDirection)
.def_readwrite("base_direction", &ML::velMANNDirectionalInput::baseDirection);
.def_readwrite("motion_direction", &ML::VelMANNDirectionalInput::motionDirection)
.def_readwrite("base_direction", &ML::VelMANNDirectionalInput::baseDirection);

BipedalLocomotion::bindings::System::CreateAdvanceable<ML::velMANNDirectionalInput, //
ML::velMANNAutoregressiveInput> //
(module, "velMANNAutoregressiveInputBuilder");
py::class_<ML::velMANNAutoregressiveInputBuilder,
System::Advanceable<ML::velMANNDirectionalInput, //
ML::velMANNAutoregressiveInput>>(module,
"velMANNAutoregressiveInputBuilder")
BipedalLocomotion::bindings::System::CreateAdvanceable<ML::VelMANNDirectionalInput, //
ML::VelMANNAutoregressiveInput> //
(module, "VelMANNAutoregressiveInputBuilder");
py::class_<ML::VelMANNAutoregressiveInputBuilder,
System::Advanceable<ML::VelMANNDirectionalInput, //
ML::VelMANNAutoregressiveInput>>(module,
"VelMANNAutoregressiveInputBuilder")
.def(py::init());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file velMANNTrajectoryGenerator.cpp
* @file VelMANNTrajectoryGenerator.cpp
* @authors Evelyn D'Elia
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand All @@ -11,8 +11,8 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <BipedalLocomotion/ML/velMANNTrajectoryGenerator.h>
#include <BipedalLocomotion/bindings/ML/velMANNTrajectoryGenerator.h>
#include <BipedalLocomotion/ML/VelMANNTrajectoryGenerator.h>
#include <BipedalLocomotion/bindings/ML/VelMANNTrajectoryGenerator.h>
#include <BipedalLocomotion/bindings/System/Advanceable.h>
#include <BipedalLocomotion/bindings/type_caster/swig.h>

Expand All @@ -29,35 +29,35 @@ void CreateVelMANNTrajectoryGenerator(pybind11::module& module)
namespace ML = BipedalLocomotion::ML;
namespace System = BipedalLocomotion::System;

py::class_<ML::velMANNTrajectoryGeneratorInput, ML::velMANNAutoregressiveInput>(module,
"velMANNTrajectoryGenera"
py::class_<ML::VelMANNTrajectoryGeneratorInput, ML::VelMANNAutoregressiveInput>(module,
"VelMANNTrajectoryGenera"
"torInput")
.def(py::init())
.def_readwrite("merge_point_index", &ML::velMANNTrajectoryGeneratorInput::mergePointIndex);
.def_readwrite("merge_point_index", &ML::VelMANNTrajectoryGeneratorInput::mergePointIndex);

py::class_<ML::velMANNTrajectoryGeneratorOutput>(module, "velMANNTrajectoryGeneratorOutput")
py::class_<ML::VelMANNTrajectoryGeneratorOutput>(module, "VelMANNTrajectoryGeneratorOutput")
.def(py::init())
.def_readwrite("timestamps", &ML::velMANNTrajectoryGeneratorOutput::timestamps)
.def_readwrite("joint_positions", &ML::velMANNTrajectoryGeneratorOutput::jointPositions)
.def_readwrite("base_poses", &ML::velMANNTrajectoryGeneratorOutput::basePoses)
.def_readwrite("phase_list", &ML::velMANNTrajectoryGeneratorOutput::phaseList)
.def_readwrite("com_trajectory", &ML::velMANNTrajectoryGeneratorOutput::comTrajectory)
.def_readwrite("timestamps", &ML::VelMANNTrajectoryGeneratorOutput::timestamps)
.def_readwrite("joint_positions", &ML::VelMANNTrajectoryGeneratorOutput::jointPositions)
.def_readwrite("base_poses", &ML::VelMANNTrajectoryGeneratorOutput::basePoses)
.def_readwrite("phase_list", &ML::VelMANNTrajectoryGeneratorOutput::phaseList)
.def_readwrite("com_trajectory", &ML::VelMANNTrajectoryGeneratorOutput::comTrajectory)
.def_readwrite("angular_momentum_trajectory",
&ML::velMANNTrajectoryGeneratorOutput::angularMomentumTrajectory);
&ML::VelMANNTrajectoryGeneratorOutput::angularMomentumTrajectory);

BipedalLocomotion::bindings::System::CreateAdvanceable<ML::velMANNTrajectoryGeneratorInput, //
ML::velMANNTrajectoryGeneratorOutput> //
(module, "velMANNTrajectoryGenerator");
py::class_<ML::velMANNTrajectoryGenerator,
System::Advanceable<ML::velMANNTrajectoryGeneratorInput, //
ML::velMANNTrajectoryGeneratorOutput>>(module,
"velMANNTrajectoryGenerator")
BipedalLocomotion::bindings::System::CreateAdvanceable<ML::VelMANNTrajectoryGeneratorInput, //
ML::VelMANNTrajectoryGeneratorOutput> //
(module, "VelMANNTrajectoryGenerator");
py::class_<ML::VelMANNTrajectoryGenerator,
System::Advanceable<ML::VelMANNTrajectoryGeneratorInput, //
ML::VelMANNTrajectoryGeneratorOutput>>(module,
"VelMANNTrajectoryGenerator")
.def(py::init())
.def("set_initial_state",
&ML::velMANNTrajectoryGenerator::setInitialState,
&ML::VelMANNTrajectoryGenerator::setInitialState,
py::arg("joint_positions"),
py::arg("base_pose"))
.def("set_robot_model", [](ML::velMANNTrajectoryGenerator& impl, ::pybind11::object& obj) {
.def("set_robot_model", [](ML::VelMANNTrajectoryGenerator& impl, ::pybind11::object& obj) {
iDynTree::Model* cls = py::detail::swig_wrapped_pointer_to_pybind<iDynTree::Model>(obj);

if (cls == nullptr)
Expand Down
Loading

0 comments on commit 7f2fe11

Please sign in to comment.