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

Merge 3d models #2

Merged
merged 50 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
073feb6
change to get building with latest rclcpp
henrygerardmoore Sep 4, 2024
94d2f15
uncrustify fixes
henrygerardmoore Sep 7, 2024
0ad7731
try disabling -Wstringop-overread
henrygerardmoore Sep 12, 2024
def055c
Merge branch 'models_3d' into merge_3d_models
henrygerardmoore Sep 13, 2024
2a2c2aa
Merge branch 'rolling' into merge_3d_models
henrygerardmoore Sep 17, 2024
ed150d9
merge main
henrygerardmoore Sep 24, 2024
0773207
apply pre-commit
henrygerardmoore Sep 24, 2024
2b01c90
do vcs in dockerfile instead
henrygerardmoore Sep 24, 2024
098cb7e
let industrial ci find our repos
henrygerardmoore Sep 24, 2024
d62f650
remove industrial CI
henrygerardmoore Sep 24, 2024
a558ab1
remove deprecated .h headers
henrygerardmoore Sep 24, 2024
d91474e
fix test tolerance and only test fuse packages, not vcs deps
henrygerardmoore Sep 24, 2024
edd25a1
bump to correct link
henrygerardmoore Sep 24, 2024
d70df28
initial pass at 3D tutorial
henrygerardmoore Sep 24, 2024
6570a94
wip 3d tutorial
henrygerardmoore Sep 25, 2024
bcc20ad
fix typos
henrygerardmoore Sep 25, 2024
8df2fc8
fix 3d tutorial
henrygerardmoore Sep 26, 2024
2c5ee14
finish tutorial, add comments, fix visualization
henrygerardmoore Sep 26, 2024
1a7ef62
fix incomplete comment
henrygerardmoore Sep 27, 2024
85d4cfa
make launch file executable
henrygerardmoore Sep 27, 2024
b4e76b6
change clang tidy conf and remove jenkinsfile
henrygerardmoore Sep 27, 2024
a98ef09
fix mistake in quat util
henrygerardmoore Oct 2, 2024
ea4e374
Update fuse_tutorials/src/three_dimensional_simulator.cpp
henrygerardmoore Oct 2, 2024
f0f0cc6
apply PR feedback
henrygerardmoore Oct 2, 2024
8c00d8d
add clang-tidy workflow
henrygerardmoore Oct 2, 2024
41e3692
add clang tidy pre-commit
henrygerardmoore Oct 3, 2024
c45e85c
add clang-tidy to pre-commit
henrygerardmoore Oct 3, 2024
a33b717
move pre-commit to after build in CI and make clang-tidy optional
henrygerardmoore Oct 3, 2024
81ef290
default to not running clang tidy, but let the user know
henrygerardmoore Oct 3, 2024
e31c89b
specify version
henrygerardmoore Oct 3, 2024
69af8ea
update first?
henrygerardmoore Oct 3, 2024
2d66302
cd into correct wd
henrygerardmoore Oct 3, 2024
04b5911
change pip cache owner
henrygerardmoore Oct 3, 2024
60c46d6
remove industrial CI
henrygerardmoore Oct 3, 2024
10abfa4
chown more stuff
henrygerardmoore Oct 3, 2024
9a6c4ce
try without container
henrygerardmoore Oct 3, 2024
66534b7
try without checkout
henrygerardmoore Oct 3, 2024
6b86114
add container back
henrygerardmoore Oct 3, 2024
8748a8f
try clang tidy outside pre-commit
henrygerardmoore Oct 4, 2024
e7ca98f
run only on changed cpp/hpp files
henrygerardmoore Oct 4, 2024
2ae9f73
point to config file
henrygerardmoore Oct 4, 2024
58d3ca6
change files to last
henrygerardmoore Oct 4, 2024
5c4a5fa
fix clang tidy path
henrygerardmoore Oct 4, 2024
6424c7a
try adding back some checks
henrygerardmoore Oct 4, 2024
445fb27
try removing cache
henrygerardmoore Oct 4, 2024
ad64883
clang tidy fix
henrygerardmoore Oct 4, 2024
65fc8bf
Merge branch 'add_clang_tidy' into merge_3d_models
henrygerardmoore Oct 4, 2024
9d22bde
remove most oft-violated checks
henrygerardmoore Oct 4, 2024
b874508
don't run clang tidy on main
henrygerardmoore Oct 4, 2024
a8f2389
Merge branch 'main' into merge_3d_models
henrygerardmoore Oct 4, 2024
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
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ Checks: -*,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-non-private-member-variables-in-classes,
-google-readability-casting,
-misc-include-cleaner,
-modernize-use-trailing-return-type,
-modernize-avoid-bind,
-readability-identifier-length,
-readability-function-cognitive-complexity,
-readability-magic-numbers,
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
. /opt/ros/rolling/setup.sh
. /colcon_ws/install/local_setup.sh
colcon test --event-handlers console_direct+ --retest-until-pass 3
colcon test --event-handlers console_direct+ --packages-select-regex fuse*
working-directory: /colcon_ws

# `colcon test` does not actually error on failure - run `colcon test-result` to generate a summary and an error code.
Expand All @@ -72,6 +72,7 @@ jobs:
working-directory: /colcon_ws

clang_tidy:
if: github.ref != 'refs/heads/main'
needs:
# Ensure the test job runs after the build job finishes instead of attempting to run in parallel
- build-ws
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
clang-tidy \
python3-vcstool \
# use cyclonedds instead of fastdds
ros-rolling-rmw-cyclonedds-cpp

Expand All @@ -22,6 +23,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get upgrade -y && \
. /opt/ros/rolling/setup.sh && \
vcs import src --input src/fuse/fuse.repos && \
rosdep install --from-paths src -y --ignore-src && \
colcon build --mixin compile-commands coverage-gcc coverage-pytest

Expand Down
2 changes: 1 addition & 1 deletion doc/Constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ by accepting, at a minimum, the UUID of each involved Variable.
The derived Constraints provided by the [fuse_constraints](../fuse_constraints) package go one step further, and
require instances of full Variable types rather than just the Variable's UUID. This is done solely to enforce
type-safety; e.g. a specific Constraint must involve two
[Position2DStamped](../fuse_variables/include/fuse_variables/position_2d_stamped.h) variables, no other variable types
[Position2DStamped](../fuse_variables/include/fuse_variables/position_2d_stamped.hpp) variables, no other variable types
are acceptable.

### Cost Function
Expand Down
9 changes: 9 additions & 0 deletions fuse.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
locusrobotics/tf2_2d:
type: git
url: https://github.com/locusrobotics/tf2_2d.git
version: rolling
covariance_geometry_ros:
type: git
url: https://github.com/giafranchini/covariance_geometry_ros.git
version: iron
7 changes: 6 additions & 1 deletion fuse_constraints/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ include(suitesparse-extras.cmake)
# plain_matrix_type<Src>::type tmp(src); | ^~~
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
VERSION_GREATER_EQUAL 12.0)
add_compile_options(-Wall -Werror -Wno-array-bounds)
add_compile_options(-Wall -Werror -Wno-array-bounds -Wno-stringop-overread)
else()
add_compile_options(-Wall -Werror)
endif()
Expand All @@ -129,18 +129,23 @@ add_library(
src/absolute_orientation_3d_stamped_euler_constraint.cpp
src/absolute_pose_2d_stamped_constraint.cpp
src/absolute_pose_3d_stamped_constraint.cpp
src/absolute_pose_3d_stamped_euler_constraint.cpp
src/marginal_constraint.cpp
src/marginal_cost_function.cpp
src/marginalize_variables.cpp
src/normal_delta.cpp
src/normal_delta_orientation_2d.cpp
src/normal_delta_pose_2d.cpp
src/normal_prior_orientation_2d.cpp
src/normal_prior_orientation_3d.cpp
src/normal_prior_pose_2d.cpp
src/normal_prior_pose_3d.cpp
src/normal_prior_pose_3d_euler.cpp
src/relative_constraint.cpp
src/relative_orientation_3d_stamped_constraint.cpp
src/relative_pose_2d_stamped_constraint.cpp
src/relative_pose_3d_stamped_constraint.cpp
src/relative_pose_3d_stamped_euler_constraint.cpp
src/uuid_ordering.cpp
src/variable_constraints.cpp)
target_include_directories(
Expand Down
35 changes: 35 additions & 0 deletions fuse_constraints/fuse_plugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@
the 2D angular acceleration.
</description>
</class>
<class type="fuse_constraints::AbsoluteAccelerationAngular3DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 3D angular acceleration, or a direct measurement of
the 3D angular acceleration.
</description>
</class>
<class type="fuse_constraints::AbsoluteAccelerationLinear2DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 2D linear acceleration, or a direct measurement of
the 2D linear acceleration.
</description>
</class>
<class type="fuse_constraints::AbsoluteAccelerationLinear3DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 3D linear acceleration, or a direct measurement of
the 3D linear acceleration.
</description>
</class>
<class type="fuse_constraints::AbsoluteOrientation2DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 2D orientation, or a direct measurement of the
Expand All @@ -35,12 +47,24 @@
the 2D angular velocity.
</description>
</class>
<class type="fuse_constraints::AbsoluteVelocityAngular3DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 3D angular velocity, or a direct measurement of
the 3D angular velocity.
</description>
</class>
<class type="fuse_constraints::AbsoluteVelocityLinear2DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 2D linear velocity, or a direct measurement of
the 2D linear velocity.
</description>
</class>
<class type="fuse_constraints::AbsoluteVelocityLinear3DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 3D linear velocity, or a direct measurement of
the 3D linear velocity.
</description>
</class>
<class type="fuse_constraints::AbsoluteOrientation3DStampedConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 3D orientation, or a direct measurement of the
Expand All @@ -63,6 +87,12 @@
A constraint that represents either prior information about a 3D pose, or a direct measurement of the 3D pose.
</description>
</class>
<class type="fuse_constraints::AbsolutePose3DStampedEulerConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents either prior information about a 3D pose, or a direct measurement of the 3D pose,
orientation parametrized in RPY.
</description>
</class>
<class type="fuse_constraints::MarginalConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents remaining marginal information on a set of variables.
Expand Down Expand Up @@ -118,4 +148,9 @@
A constraint that represents a measurement on the difference between two 3D poses.
</description>
</class>
<class type="fuse_constraints::RelativePose3DStampedEulerConstraint" base_class_type="fuse_core::Constraint">
<description>
A constraint that represents a measurement on the difference between two 3D poses, orientation parametrized in RPY.
</description>
</class>
</library>
42 changes: 0 additions & 42 deletions fuse_constraints/include/fuse_constraints/absolute_constraint.h

This file was deleted.

12 changes: 12 additions & 0 deletions fuse_constraints/include/fuse_constraints/absolute_constraint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@
#include <fuse_core/serialization.hpp>
#include <fuse_core/uuid.hpp>
#include <fuse_variables/acceleration_angular_2d_stamped.hpp>
#include <fuse_variables/acceleration_angular_3d_stamped.hpp>
#include <fuse_variables/acceleration_linear_2d_stamped.hpp>
#include <fuse_variables/acceleration_linear_3d_stamped.hpp>
#include <fuse_variables/orientation_2d_stamped.hpp>
#include <fuse_variables/position_2d_stamped.hpp>
#include <fuse_variables/position_3d_stamped.hpp>
#include <fuse_variables/velocity_angular_2d_stamped.hpp>
#include <fuse_variables/velocity_angular_3d_stamped.hpp>
#include <fuse_variables/velocity_linear_3d_stamped.hpp>
#include <fuse_variables/velocity_linear_2d_stamped.hpp>

#include <boost/serialization/access.hpp>
Expand Down Expand Up @@ -193,23 +197,31 @@ class AbsoluteConstraint : public fuse_core::Constraint

// Define unique names for the different variations of the absolute constraint
using AbsoluteAccelerationAngular2DStampedConstraint = AbsoluteConstraint<fuse_variables::AccelerationAngular2DStamped>;
using AbsoluteAccelerationAngular3DStampedConstraint = AbsoluteConstraint<fuse_variables::AccelerationAngular3DStamped>;
using AbsoluteAccelerationLinear2DStampedConstraint = AbsoluteConstraint<fuse_variables::AccelerationLinear2DStamped>;
using AbsoluteAccelerationLinear3DStampedConstraint = AbsoluteConstraint<fuse_variables::AccelerationLinear3DStamped>;
using AbsoluteOrientation2DStampedConstraint = AbsoluteConstraint<fuse_variables::Orientation2DStamped>;
using AbsolutePosition2DStampedConstraint = AbsoluteConstraint<fuse_variables::Position2DStamped>;
using AbsolutePosition3DStampedConstraint = AbsoluteConstraint<fuse_variables::Position3DStamped>;
using AbsoluteVelocityAngular2DStampedConstraint = AbsoluteConstraint<fuse_variables::VelocityAngular2DStamped>;
using AbsoluteVelocityAngular3DStampedConstraint = AbsoluteConstraint<fuse_variables::VelocityAngular3DStamped>;
using AbsoluteVelocityLinear2DStampedConstraint = AbsoluteConstraint<fuse_variables::VelocityLinear2DStamped>;
using AbsoluteVelocityLinear3DStampedConstraint = AbsoluteConstraint<fuse_variables::VelocityLinear3DStamped>;
} // namespace fuse_constraints

// Include the template implementation
#include <fuse_constraints/absolute_constraint_impl.hpp>

BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteAccelerationAngular2DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteAccelerationAngular3DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteAccelerationLinear2DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteAccelerationLinear3DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteOrientation2DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsolutePosition2DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsolutePosition3DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteVelocityAngular2DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteVelocityAngular3DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteVelocityLinear2DStampedConstraint);
BOOST_CLASS_EXPORT_KEY(fuse_constraints::AbsoluteVelocityLinear3DStampedConstraint);

#endif // FUSE_CONSTRAINTS__ABSOLUTE_CONSTRAINT_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ inline std::string AbsoluteConstraint<fuse_variables::AccelerationLinear2DStampe
return "fuse_constraints::AbsoluteAccelerationLinear2DStampedConstraint";
}

template <>
inline std::string AbsoluteConstraint<fuse_variables::AccelerationAngular3DStamped>::type() const
{
return "fuse_constraints::AbsoluteAccelerationAngular3DStampedConstraint";
}

template <>
inline std::string AbsoluteConstraint<fuse_variables::AccelerationLinear3DStamped>::type() const
{
return "fuse_constraints::AbsoluteAccelerationLinear3DStampedConstraint";
}

template <>
inline std::string AbsoluteConstraint<fuse_variables::Orientation2DStamped>::type() const
{
Expand Down Expand Up @@ -179,6 +191,18 @@ inline std::string AbsoluteConstraint<fuse_variables::VelocityLinear2DStamped>::
return "fuse_constraints::AbsoluteVelocityLinear2DStampedConstraint";
}

template <>
inline std::string AbsoluteConstraint<fuse_variables::VelocityAngular3DStamped>::type() const
{
return "fuse_constraints::AbsoluteVelocityAngular3DStampedConstraint";
}

template <>
inline std::string AbsoluteConstraint<fuse_variables::VelocityLinear3DStamped>::type() const
{
return "fuse_constraints::AbsoluteVelocityLinear3DStampedConstraint";
}

} // namespace fuse_constraints

#endif // FUSE_CONSTRAINTS__ABSOLUTE_CONSTRAINT_IMPL_HPP_

This file was deleted.

This file was deleted.

Loading
Loading