Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: split trajectory classes and implement Cartesian/JointState specializations #218

Open
wants to merge 54 commits into
base: feat/trajectory-msgs-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
61455af
feat: move up to C++20
bpapaspyros Jan 13, 2025
1c0c110
refactor: format Trajectory.hpp
bpapaspyros Jan 13, 2025
b957af4
refactor: simplify Trajectory to a flatter base class
bpapaspyros Jan 13, 2025
cee8f97
feat: add Cartesian/JointTrajectory to StateType
bpapaspyros Jan 14, 2025
c76f70d
feat: implement CartesianTrajectory
bpapaspyros Jan 15, 2025
12782ac
feat: implement JointTrajectory class
bpapaspyros Jan 15, 2025
a6761ef
fix: override cleanup functions and allow derived classes to clean
bpapaspyros Jan 15, 2025
094c7e3
feat: add set_point(s) functionality
bpapaspyros Jan 15, 2025
9c11b71
test: expand test case coverage
bpapaspyros Jan 15, 2025
eeae5ab
refactor: rename directory from trajectories->trajectory
bpapaspyros Jan 15, 2025
d2dcae7
docs: update CHANGELOG.md
bpapaspyros Jan 15, 2025
6326d0d
fix: make get_point(s) public in TrajectoryBase
bpapaspyros Jan 15, 2025
c41fd67
docs: update CHANGELOG.md
bpapaspyros Jan 15, 2025
216f1b9
fix: python update bindings
bpapaspyros Jan 15, 2025
0dbf0f1
Revert "feat: move up to C++20"
bpapaspyros Jan 16, 2025
e4f3fb0
refactor: tidy up headers (public/protected/private)
bpapaspyros Jan 16, 2025
f1844f6
refactor: redifine number sequence of StateType enum
bpapaspyros Jan 16, 2025
94ef3f3
fix: make TrajectoryBase contructors protected
bpapaspyros Jan 16, 2025
5c45bec
docs: docstrings
bpapaspyros Jan 16, 2025
0b06d51
fix: change set_point signature to move index at the end
bpapaspyros Jan 16, 2025
0748fb2
fix: minor fix in TrajectoryBase [] overload
bpapaspyros Jan 16, 2025
2b40eb9
feat: add more Trajectory constructors
bpapaspyros Jan 16, 2025
198569d
fix: set_point(s) functions throw instead of returning bool
bpapaspyros Jan 16, 2025
c5c7139
test: adapt tests
bpapaspyros Jan 16, 2025
cf30137
refactor: redesign the flat trajectory classes and pack data better
bpapaspyros Jan 19, 2025
cf54ae0
refactor: make base class get_point(s) classes protected
bpapaspyros Jan 19, 2025
3478b0b
fix: expose get_points functions in test interface
bpapaspyros Jan 19, 2025
ced7d7c
fix: rearrange includes
bpapaspyros Jan 28, 2025
741c017
docs: update docstrings
bpapaspyros Jan 28, 2025
47e6311
fix: tidy up clear, reset, and delete functions
bpapaspyros Jan 28, 2025
ee987c7
feat: implement add_points function in TrajectoryBase
bpapaspyros Jan 28, 2025
f0e75bc
feat: implement add_points functions for derived classes
bpapaspyros Jan 28, 2025
1e8e12c
test: fix tests on reset
bpapaspyros Jan 28, 2025
8bc0280
refactor: variable renaming
bpapaspyros Jan 28, 2025
f95ad5e
fix: improve get_times_from_start
bpapaspyros Jan 28, 2025
3d7e7f2
fix: tidy up TrajectoryBase [] overload and exceptions
bpapaspyros Jan 28, 2025
abc89bf
fix: use add_point in CartesianTrajectory constructor
bpapaspyros Jan 28, 2025
fe5c9a2
fix: condition and state update after delete_point
bpapaspyros Jan 28, 2025
c4e59c8
Merge branch 'main' into feat/restructure-trajectory-classes
bpapaspyros Jan 28, 2025
a903f18
feat: delete_point by providing and index
bpapaspyros Jan 28, 2025
f0ffbcc
fix: use vectors instead of queues in getters
bpapaspyros Jan 29, 2025
8610d36
fix: rearrange constructor arguments
bpapaspyros Jan 29, 2025
63cb968
refactor: change reference frame/joint names/robot name setting logic
bpapaspyros Jan 29, 2025
1f8b30e
fix: correct flag value when deleting results in empty queue
bpapaspyros Jan 29, 2025
4534679
fix: further restructure constructors
bpapaspyros Jan 30, 2025
e85cee4
Merge branch 'feat/trajectory-msgs-dev' into feat/restructure-traject…
bpapaspyros Jan 30, 2025
739ba8a
test: clean up and improve test structure and test coverage
bpapaspyros Jan 30, 2025
914a826
refactor: improve condition checks in vector operations
bpapaspyros Jan 30, 2025
0ff1210
refactor: re-arrange includes
bpapaspyros Jan 30, 2025
93419ca
fix: better checks for empty vector arguments
bpapaspyros Jan 30, 2025
2ed6228
refactor: improve/optimize code structure and readability
bpapaspyros Jan 31, 2025
55afa45
fix: more constructor touch ups and docstring updates
bpapaspyros Jan 31, 2025
822401b
feat: add getters for individual duration & time from start
bpapaspyros Jan 31, 2025
bd0c01c
feat: add function that returns the total trajectory duration
bpapaspyros Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Release Versions
- feat: improve support for transformation matrices (#146)
- fix: unstable python test (#221)
- feat: move up to C++20 (#220)
- feat: split trajectory classes and implement Cartesian/JointState specializations (#216)

## 9.1.0

Expand Down
3 changes: 2 additions & 1 deletion python/source/state_representation/bind_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ void state_type(py::module_& m) {
.value("PARAMETER", StateType::PARAMETER)
.value("GEOMETRY_SHAPE", StateType::GEOMETRY_SHAPE)
.value("GEOMETRY_ELLIPSOID", StateType::GEOMETRY_ELLIPSOID)
.value("TRAJECTORY", StateType::TRAJECTORY)
.value("CARTESIAN_TRAJECTORY", StateType::CARTESIAN_TRAJECTORY)
.value("JOINT_TRAJECTORY", StateType::JOINT_TRAJECTORY)
.value("DIGITAL_IO_STATE", StateType::DIGITAL_IO_STATE)
.value("ANALOG_IO_STATE", StateType::ANALOG_IO_STATE)
.export_values();
Expand Down
2 changes: 2 additions & 0 deletions source/state_representation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ set(CORE_SOURCES
src/parameters/Predicate.cpp
src/geometry/Shape.cpp
src/geometry/Ellipsoid.cpp
src/trajectory/CartesianTrajectory.cpp
src/trajectory/JointTrajectory.cpp
)

if (EXPERIMENTAL_FEATURES)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <string>

/**
* @namespace state_representation
* @brief Core state variables and objects
Expand All @@ -11,30 +13,31 @@ namespace state_representation {
* @brief The class types inheriting from State
*/
enum class StateType {
NONE,
STATE,
SPATIAL_STATE,
CARTESIAN_STATE,
CARTESIAN_POSE,
CARTESIAN_TWIST,
CARTESIAN_ACCELERATION,
CARTESIAN_WRENCH,
JOINT_STATE,
JOINT_POSITIONS,
JOINT_VELOCITIES,
JOINT_ACCELERATIONS,
JOINT_TORQUES,
JACOBIAN,
PARAMETER,
GEOMETRY_SHAPE,
GEOMETRY_ELLIPSOID,
TRAJECTORY,
DIGITAL_IO_STATE,
ANALOG_IO_STATE,
NONE = 0,
STATE = 1,
SPATIAL_STATE = 2,
CARTESIAN_STATE = 3,
CARTESIAN_POSE = 4,
CARTESIAN_TWIST = 5,
CARTESIAN_ACCELERATION = 6,
CARTESIAN_WRENCH = 7,
JOINT_STATE = 8,
JOINT_POSITIONS = 9,
JOINT_VELOCITIES = 10,
JOINT_ACCELERATIONS = 11,
JOINT_TORQUES = 12,
JACOBIAN = 13,
PARAMETER = 14,
GEOMETRY_SHAPE = 15,
GEOMETRY_ELLIPSOID = 16,
DIGITAL_IO_STATE = 18,
ANALOG_IO_STATE = 19,
CARTESIAN_TRAJECTORY = 20,
JOINT_TRAJECTORY = 21,
#ifdef EXPERIMENTAL_FEATURES
DUAL_QUATERNION_STATE,
DUAL_QUATERNION_POSE,
DUAL_QUATERNION_TWIST
DUAL_QUATERNION_STATE = 22,
DUAL_QUATERNION_POSE = 23,
DUAL_QUATERNION_TWIST = 24
#endif
};

Expand Down Expand Up @@ -75,8 +78,10 @@ enum class StateType {
return "Shape";
case StateType::GEOMETRY_ELLIPSOID:
return "Ellipsoid";
case StateType::TRAJECTORY:
return "Trajectory";
case StateType::CARTESIAN_TRAJECTORY:
return "CartesianTrajectory";
case StateType::JOINT_TRAJECTORY:
return "JointTrajectory";
case StateType::DIGITAL_IO_STATE:
return "DigitalIOState";
case StateType::ANALOG_IO_STATE:
Expand Down

This file was deleted.

Loading