Skip to content

[pre-commit.ci] pre-commit autoupdate #231

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

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_branch: devel
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.6.9
hooks:
- id: ruff
args:
Expand All @@ -19,13 +19,13 @@ repos:
- id: toml-sort-fix
exclude: poetry.lock
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v19.1.1
hooks:
- id: clang-format
args:
- --style=Google
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down
21 changes: 11 additions & 10 deletions include/hpp/corbaserver/servant-base.hh
Original file line number Diff line number Diff line change
Expand Up @@ -484,16 +484,17 @@ struct vectorToSeqServant {
/// // PathVector directly inherits from Path
/// HPP_CORBASERVER_ADD_DOWNCAST_OBJECT(PathVector, Path, 1)
/// \endcode
#define HPP_CORBASERVER_ADD_DOWNCAST_OBJECT(ServantType, BaseServantType, \
depth) \
struct HPP_CORE_DLLAPI __InitializerClass_##ServantType { \
__InitializerClass_##ServantType() { \
::hpp::corbaServer::addDowncastObjects<BaseServantType>( \
new ::hpp::corbaServer::ServantFactory<BaseServantType, \
ServantType>(depth)); \
} \
}; \
HPP_CORBASERVER_DLLLOCAL __InitializerClass_##ServantType \
#define HPP_CORBASERVER_ADD_DOWNCAST_OBJECT(ServantType, BaseServantType, \
depth) \
struct HPP_CORE_DLLAPI __InitializerClass_##ServantType{ \
__InitializerClass_##ServantType(){ \
::hpp::corbaServer::addDowncastObjects<BaseServantType>( \
new ::hpp::corbaServer::ServantFactory<BaseServantType, \
ServantType>(depth)); \
} \
} \
; \
HPP_CORBASERVER_DLLLOCAL __InitializerClass_##ServantType \
__instance_##ServantType;

#endif // HPP_CORBASERVER_SERVANT_BASE_HH
39 changes: 18 additions & 21 deletions src/problem.impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,9 @@ DifferentiableFunctionPtr_t buildGenericFunc(

if (relative) {
// Both joints are provided
return constraints::GenericTransformation<
PositionOrientationFlag | constraints::RelativeBit>::create(name, robot,
joint1,
joint2,
ref1, ref2,
mask);
return constraints::GenericTransformation < PositionOrientationFlag |
constraints::RelativeBit >
::create(name, robot, joint1, joint2, ref1, ref2, mask);
} else {
return constraints::GenericTransformation<PositionOrientationFlag>::create(
name, robot, joint2, ref2, ref1, mask);
Expand Down Expand Up @@ -581,10 +578,10 @@ void Problem::createTransformationConstraint(const char* constraintName,
Transform3f ref(toTransform3f(p));
std::string name(constraintName);
DifferentiableFunctionPtr_t func =
buildGenericFunc<constraints::PositionBit |
constraints::OrientationBit>(
problemSolver()->robot(), name, joint1Name, joint2Name, ref, Id,
boolSeqToVector(mask, 6));
buildGenericFunc < constraints::PositionBit |
constraints::OrientationBit > (problemSolver()->robot(), name,
joint1Name, joint2Name, ref, Id,
boolSeqToVector(mask, 6));

problemSolver()->addNumericalConstraint(
name,
Expand All @@ -606,11 +603,11 @@ void Problem::createTransformationConstraint2(const char* constraintName,
if (!problemSolver()->robot()) throw hpp::Error("No robot loaded");
std::string name(constraintName);
DifferentiableFunctionPtr_t func =
buildGenericFunc<constraints::PositionBit |
constraints::OrientationBit>(
problemSolver()->robot(), name, joint1Name, joint2Name,
toTransform3f(frame1), toTransform3f(frame2),
boolSeqToVector(mask, 6));
buildGenericFunc < constraints::PositionBit |
constraints::OrientationBit >
(problemSolver()->robot(), name, joint1Name, joint2Name,
toTransform3f(frame1), toTransform3f(frame2),
boolSeqToVector(mask, 6));

problemSolver()->addNumericalConstraint(
name,
Expand All @@ -632,12 +629,12 @@ void Problem::createTransformationR3xSO3Constraint(const char* constraintName,
if (!problemSolver()->robot()) throw hpp::Error("No robot loaded");
std::string name(constraintName);
DifferentiableFunctionPtr_t func =
buildGenericFunc<constraints::OutputR3xSO3Bit |
constraints::PositionBit |
constraints::OrientationBit>(
problemSolver()->robot(), name, joint1Name, joint2Name,
toTransform3f(frame1), toTransform3f(frame2),
boolSeqToVector(mask, 6));
buildGenericFunc < constraints::OutputR3xSO3Bit |
constraints::PositionBit |
constraints::OrientationBit >
(problemSolver()->robot(), name, joint1Name, joint2Name,
toTransform3f(frame1), toTransform3f(frame2),
boolSeqToVector(mask, 6));

problemSolver()->addNumericalConstraint(
name,
Expand Down
2 changes: 1 addition & 1 deletion tests/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_tools(self):
assert object_ids[0] == cl.orb.object_to_string(pb)

pb2 = cl.orb.string_to_object(object_ids[0])
assert type(pb) == type(pb2)
assert type(pb) is type(pb2)
pb2.persistantStorage(False)

def test_createConstraints(self):
Expand Down
1 change: 1 addition & 0 deletions tests/quat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from math import cos, pi, sin, sqrt

import numpy as np

from hpp import Quaternion

ok = True
Expand Down