Skip to content

Commit

Permalink
Changes header formatting (#549)
Browse files Browse the repository at this point in the history
* Set IncludeBlocks to Regroup

* Format code

* Include aikido headers with <...> in tests.

* Include aikido headers with "..." within aikido.

* Reformat headers.

* Temporarily revert formatting changes in actual code.

* Replace relative includes with .. with aikido includes.

* Replace relative includes to local headers with full path.

* Reformat headers.

* Fix component headers.

* Fix compilation errors.
  • Loading branch information
madan96 authored and brianhou committed Sep 10, 2019
1 parent a41e35a commit 4270781
Show file tree
Hide file tree
Showing 337 changed files with 820 additions and 481 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# sort headers by main include file (implicit priority 0),
# then project and private includes, then system headers
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<([a-z|_]+)>' # standard library headers
Priority: 1
Expand Down
20 changes: 10 additions & 10 deletions include/aikido/common.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "common/ExecutorMultiplexer.hpp"
#include "common/ExecutorThread.hpp"
#include "common/PseudoInverse.hpp"
#include "common/RNG.hpp"
#include "common/Spline.hpp"
#include "common/StepSequence.hpp"
#include "common/VanDerCorput.hpp"
#include "common/metaprogramming.hpp"
#include "common/stream.hpp"
#include "common/string.hpp"
#include "aikido/common/ExecutorMultiplexer.hpp"
#include "aikido/common/ExecutorThread.hpp"
#include "aikido/common/PseudoInverse.hpp"
#include "aikido/common/RNG.hpp"
#include "aikido/common/Spline.hpp"
#include "aikido/common/StepSequence.hpp"
#include "aikido/common/VanDerCorput.hpp"
#include "aikido/common/metaprogramming.hpp"
#include "aikido/common/stream.hpp"
#include "aikido/common/string.hpp"
2 changes: 1 addition & 1 deletion include/aikido/common/ExecutorThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ class ExecutorThread final
} // namespace common
} // namespace aikido

#include <aikido/common/detail/ExecutorThread-impl.hpp>
#include "aikido/common/detail/ExecutorThread-impl.hpp"

#endif // AIKIDO_COMMON_EXECUTORTHREAD_HPP_
2 changes: 2 additions & 0 deletions include/aikido/common/RNG.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <cstdint>
#include <memory>
#include <random>

#include <Eigen/Geometry>

#include "aikido/common/pointers.hpp"

namespace aikido {
Expand Down
1 change: 1 addition & 0 deletions include/aikido/common/Spline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <cstddef>
#include <memory>
#include <vector>

#include <Eigen/Core>
#include <Eigen/QR>
#include <Eigen/Sparse>
Expand Down
1 change: 1 addition & 0 deletions include/aikido/common/StepSequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <cassert>
#include <limits>
#include <tuple>

#include <boost/iterator/iterator_facade.hpp>

namespace aikido {
Expand Down
1 change: 1 addition & 0 deletions include/aikido/common/VanDerCorput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <limits>
#include <utility>

#include <boost/iterator/iterator_facade.hpp>

namespace aikido {
Expand Down
2 changes: 1 addition & 1 deletion include/aikido/common/detail/ExecutorThread-impl.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <aikido/common/ExecutorThread.hpp>
#include "aikido/common/ExecutorThread.hpp"

namespace aikido {
namespace common {
Expand Down
4 changes: 2 additions & 2 deletions include/aikido/common/detail/algorithm-impl.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef AIKIDO_COMMON_DETAIL_ALGORITHM_IMPL_HPP_
#define AIKIDO_COMMON_DETAIL_ALGORITHM_IMPL_HPP_

#include "aikido/common/algorithm.hpp"

#include <cassert>
#include <functional>

#include "aikido/common/algorithm.hpp"

namespace aikido {
namespace common {

Expand Down
4 changes: 2 additions & 2 deletions include/aikido/common/detail/pair-impl.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef AIKIDO_COMMON_DETAIL_PAIR_IMPL_HPP_
#define AIKIDO_COMMON_DETAIL_PAIR_IMPL_HPP_

#include <aikido/common/pair.hpp>

#include <boost/functional/hash.hpp>

#include "aikido/common/pair.hpp"

namespace aikido {
namespace common {

Expand Down
1 change: 1 addition & 0 deletions include/aikido/common/stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define AIKIDO_COMMON_STREAM_HPP_

#include <iostream>

#include <dart/collision/collision.hpp>

namespace aikido {
Expand Down
54 changes: 27 additions & 27 deletions include/aikido/constraint.hpp
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#include "constraint/CartesianProductProjectable.hpp"
#include "constraint/CartesianProductSampleable.hpp"
#include "constraint/CartesianProductTestable.hpp"
#include "constraint/CyclicSampleable.hpp"
#include "constraint/Differentiable.hpp"
#include "constraint/DifferentiableIntersection.hpp"
#include "constraint/DifferentiableSubspace.hpp"
#include "constraint/FiniteSampleable.hpp"
#include "constraint/NewtonsMethodProjectable.hpp"
#include "constraint/Projectable.hpp"
#include "constraint/RejectionSampleable.hpp"
#include "constraint/Sampleable.hpp"
#include "constraint/Satisfied.hpp"
#include "constraint/Testable.hpp"
#include "constraint/TestableIntersection.hpp"
#include "constraint/dart/CollisionFree.hpp"
#include "constraint/dart/FrameDifferentiable.hpp"
#include "constraint/dart/FramePairDifferentiable.hpp"
#include "constraint/dart/FrameTestable.hpp"
#include "constraint/dart/InverseKinematicsSampleable.hpp"
#include "constraint/dart/JointStateSpaceHelpers.hpp"
#include "constraint/dart/TSR.hpp"
#include "constraint/uniform/RnBoxConstraint.hpp"
#include "constraint/uniform/RnConstantSampler.hpp"
#include "constraint/uniform/SE2BoxConstraint.hpp"
#include "constraint/uniform/SO2UniformSampler.hpp"
#include "constraint/uniform/SO3UniformSampler.hpp"
#include "aikido/constraint/CartesianProductProjectable.hpp"
#include "aikido/constraint/CartesianProductSampleable.hpp"
#include "aikido/constraint/CartesianProductTestable.hpp"
#include "aikido/constraint/CyclicSampleable.hpp"
#include "aikido/constraint/Differentiable.hpp"
#include "aikido/constraint/DifferentiableIntersection.hpp"
#include "aikido/constraint/DifferentiableSubspace.hpp"
#include "aikido/constraint/FiniteSampleable.hpp"
#include "aikido/constraint/NewtonsMethodProjectable.hpp"
#include "aikido/constraint/Projectable.hpp"
#include "aikido/constraint/RejectionSampleable.hpp"
#include "aikido/constraint/Sampleable.hpp"
#include "aikido/constraint/Satisfied.hpp"
#include "aikido/constraint/Testable.hpp"
#include "aikido/constraint/TestableIntersection.hpp"
#include "aikido/constraint/dart/CollisionFree.hpp"
#include "aikido/constraint/dart/FrameDifferentiable.hpp"
#include "aikido/constraint/dart/FramePairDifferentiable.hpp"
#include "aikido/constraint/dart/FrameTestable.hpp"
#include "aikido/constraint/dart/InverseKinematicsSampleable.hpp"
#include "aikido/constraint/dart/JointStateSpaceHelpers.hpp"
#include "aikido/constraint/dart/TSR.hpp"
#include "aikido/constraint/uniform/RnBoxConstraint.hpp"
#include "aikido/constraint/uniform/RnConstantSampler.hpp"
#include "aikido/constraint/uniform/SE2BoxConstraint.hpp"
#include "aikido/constraint/uniform/SO2UniformSampler.hpp"
#include "aikido/constraint/uniform/SO3UniformSampler.hpp"

namespace aikido {
namespace constraint {
Expand Down
4 changes: 2 additions & 2 deletions include/aikido/constraint/CartesianProductProjectable.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef AIKIDO_CONSTRAINT_CARTESIANPRODUCTPROJECTABLE_HPP_
#define AIKIDO_CONSTRAINT_CARTESIANPRODUCTPROJECTABLE_HPP_

#include "../statespace/CartesianProduct.hpp"
#include "Projectable.hpp"
#include "aikido/constraint/Projectable.hpp"
#include "aikido/statespace/CartesianProduct.hpp"

namespace aikido {
namespace constraint {
Expand Down
5 changes: 3 additions & 2 deletions include/aikido/constraint/CartesianProductSampleable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define AIKIDO_CONSTRAINT_CARTESIANPRODUCTSAMPLEABLE_HPP_

#include <vector>
#include "../statespace/CartesianProduct.hpp"
#include "Sampleable.hpp"

#include "aikido/constraint/Sampleable.hpp"
#include "aikido/statespace/CartesianProduct.hpp"

namespace aikido {
namespace constraint {
Expand Down
5 changes: 3 additions & 2 deletions include/aikido/constraint/CartesianProductTestable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define AIKIDO_CONSTRAINT_TESTABLESUBSPACE_HPP_

#include <vector>
#include "../statespace/CartesianProduct.hpp"
#include "Testable.hpp"

#include "aikido/constraint/Testable.hpp"
#include "aikido/statespace/CartesianProduct.hpp"

namespace aikido {
namespace constraint {
Expand Down
2 changes: 1 addition & 1 deletion include/aikido/constraint/CyclicSampleable.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef AIKIDO_CONSTRAINT_CYCLICSAMPLEABLE_HPP_
#define AIKIDO_CONSTRAINT_CYCLICSAMPLEABLE_HPP_

#include "Sampleable.hpp"
#include "aikido/constraint/Sampleable.hpp"

namespace aikido {
namespace constraint {
Expand Down
2 changes: 1 addition & 1 deletion include/aikido/constraint/DefaultTestableOutcome.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef AIKIDO_CONSTRAINT_DEFAULTTESTABLEOUTCOME_HPP_
#define AIKIDO_CONSTRAINT_DEFAULTTESTABLEOUTCOME_HPP_

#include "TestableOutcome.hpp"
#include "aikido/constraint/TestableOutcome.hpp"

namespace aikido {
namespace constraint {
Expand Down
4 changes: 3 additions & 1 deletion include/aikido/constraint/Differentiable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#define AIKIDO_CONSTRAINT_DIFFERENTIABLE_HPP_

#include <memory>

#include <Eigen/Dense>

#include "aikido/common/pointers.hpp"
#include "../statespace/StateSpace.hpp"
#include "aikido/statespace/StateSpace.hpp"

namespace aikido {
namespace constraint {
Expand Down
6 changes: 4 additions & 2 deletions include/aikido/constraint/DifferentiableIntersection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#define AIKIDO_CONSTRAINT_DIFFERENTIABLEINTERSECTION_HPP_

#include <memory>

#include <Eigen/Dense>
#include "../statespace/StateSpace.hpp"
#include "Differentiable.hpp"

#include "aikido/constraint/Differentiable.hpp"
#include "aikido/statespace/StateSpace.hpp"

namespace aikido {
namespace constraint {
Expand Down
4 changes: 2 additions & 2 deletions include/aikido/constraint/DifferentiableSubspace.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef AIKIDO_CONSTRAINT_DIFFERENTIABLESUBSPACE_HPP_
#define AIKIDO_CONSTRAINT_DIFFERENTIABLESUBSPACE_HPP_

#include "../statespace/CartesianProduct.hpp"
#include "Differentiable.hpp"
#include "aikido/constraint/Differentiable.hpp"
#include "aikido/statespace/CartesianProduct.hpp"

namespace aikido {
namespace constraint {
Expand Down
2 changes: 1 addition & 1 deletion include/aikido/constraint/FiniteSampleable.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef AIKIDO_CONSTRAINT_FINITESAMPLEABLE_HPP_
#define AIKIDO_CONSTRAINT_FINITESAMPLEABLE_HPP_

#include "Sampleable.hpp"
#include "aikido/constraint/Sampleable.hpp"

namespace aikido {
namespace constraint {
Expand Down
5 changes: 3 additions & 2 deletions include/aikido/constraint/NewtonsMethodProjectable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define AIKIDO_CONSTRAINT_NEWTONSMETHODPROJECTABLE_HPP_

#include <Eigen/Dense>
#include "Differentiable.hpp"
#include "Projectable.hpp"

#include "aikido/constraint/Differentiable.hpp"
#include "aikido/constraint/Projectable.hpp"

namespace aikido {
namespace constraint {
Expand Down
3 changes: 2 additions & 1 deletion include/aikido/constraint/Projectable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define AIKIDO_CONSTRAINT_PROJECTABLE_H

#include <Eigen/Dense>
#include "../statespace/StateSpace.hpp"

#include "aikido/statespace/StateSpace.hpp"

namespace aikido {
namespace constraint {
Expand Down
6 changes: 3 additions & 3 deletions include/aikido/constraint/RejectionSampleable.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef AIKIDO_CONSTRAINT_REJECTIONSAMPLEABLE_HPP_
#define AIKIDO_CONSTRAINT_REJECTIONSAMPLEABLE_HPP_

#include "../statespace/StateSpace.hpp"
#include "Sampleable.hpp"
#include "Testable.hpp"
#include "aikido/constraint/Sampleable.hpp"
#include "aikido/constraint/Testable.hpp"
#include "aikido/statespace/StateSpace.hpp"

namespace aikido {
namespace constraint {
Expand Down
5 changes: 3 additions & 2 deletions include/aikido/constraint/Sampleable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

#include <limits>
#include <memory>

#include <boost/optional.hpp>

#include "aikido/common/RNG.hpp"
#include "aikido/common/pointers.hpp"
#include "../common/RNG.hpp"
#include "../statespace/StateSpace.hpp"
#include "aikido/statespace/StateSpace.hpp"

namespace aikido {
namespace constraint {
Expand Down
8 changes: 4 additions & 4 deletions include/aikido/constraint/Satisfied.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef AIKIDO_CONSTRAINT_SATISFIED_HPP_
#define AIKIDO_CONSTRAINT_SATISFIED_HPP_
#include "Differentiable.hpp"
#include "Projectable.hpp"
#include "Sampleable.hpp"
#include "Testable.hpp"
#include "aikido/constraint/Differentiable.hpp"
#include "aikido/constraint/Projectable.hpp"
#include "aikido/constraint/Sampleable.hpp"
#include "aikido/constraint/Testable.hpp"

namespace aikido {
namespace constraint {
Expand Down
5 changes: 3 additions & 2 deletions include/aikido/constraint/Testable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#define AIKIDO_CONSTRAINT_TESTABLE_HPP_

#include <memory>

#include "aikido/common/pointers.hpp"
#include "../statespace/StateSpace.hpp"
#include "DefaultTestableOutcome.hpp"
#include "aikido/constraint/DefaultTestableOutcome.hpp"
#include "aikido/statespace/StateSpace.hpp"

namespace aikido {
namespace constraint {
Expand Down
3 changes: 2 additions & 1 deletion include/aikido/constraint/TestableIntersection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#include <memory>
#include <vector>
#include "Testable.hpp"

#include "aikido/constraint/Testable.hpp"

namespace aikido {
namespace constraint {
Expand Down
2 changes: 2 additions & 0 deletions include/aikido/constraint/dart/CollisionFree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#include <memory>
#include <tuple>
#include <vector>

#include <dart/collision/CollisionDetector.hpp>
#include <dart/collision/CollisionFilter.hpp>
#include <dart/collision/CollisionGroup.hpp>
#include <dart/collision/CollisionOption.hpp>

#include "aikido/common/pointers.hpp"
#include "aikido/constraint/Testable.hpp"
#include "aikido/constraint/dart/CollisionFreeOutcome.hpp"
Expand Down
2 changes: 2 additions & 0 deletions include/aikido/constraint/dart/CollisionFreeOutcome.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
#define AIKIDO_CONSTRAINT_DART_COLLISIONFREEOUTCOME_HPP_

#include <vector>

#include <dart/collision/CollisionObject.hpp>
#include <dart/collision/Contact.hpp>
#include <dart/dynamics/BodyNode.hpp>
#include <dart/dynamics/ShapeFrame.hpp>
#include <dart/dynamics/ShapeNode.hpp>

#include "aikido/constraint/TestableOutcome.hpp"

namespace aikido {
Expand Down
4 changes: 2 additions & 2 deletions include/aikido/constraint/dart/FrameDifferentiable.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef AIKIDO_CONSTRAINT_DART_FRAMEDIFFERENTIABLE_HPP_
#define AIKIDO_CONSTRAINT_DART_FRAMEDIFFERENTIABLE_HPP_

#include <Eigen/Dense>
#include <dart/dynamics/dynamics.hpp>

#include "aikido/constraint/Differentiable.hpp"
#include "aikido/statespace/dart/MetaSkeletonStateSpace.hpp"

#include <Eigen/Dense>

namespace aikido {
namespace constraint {
namespace dart {
Expand Down
Loading

0 comments on commit 4270781

Please sign in to comment.