12 std::make_shared<Geometry>(
Geometry::BOX, Eigen::Vector2d{0.5, 0.5}, Eigen::Vector3d{0, 0, 0})
16 std::make_shared<Geometry>(
Geometry::BOX, Eigen::Vector2d{0.5, 0.5}, Eigen::Vector3d{0.1, 0, 0}),
17 std::make_shared<Geometry>(Geometry::BOX, Eigen::Vector2d{0.5, 0.5}, Eigen::Vector3d{-0.1, 0, 0}),
20 auto f_1 = std::make_shared<Frame>(
"l1",
21 Eigen::Vector3d{0, 0, 0},
27 auto f_2 = std::make_shared<Frame>(
"l2",
28 Eigen::Vector3d{0, 0, 0},
34 auto robot = std::make_shared<Robot>();
35 robot->attachFrame(f_1);
36 robot->attachFrame(f_2);
42 auto state = std::make_shared<State>(robot);
43 for (
double s = 0; s <= 3; s += 0.01)
45 state->setFloatJoint(robot,
"l1", Eigen::Vector3d{0, -1.5 + s, 0});
46 state->setFloatJoint(robot,
"l2", Eigen::Vector3d{0, 0, 0});
50 auto d = cm.
distance(state, distances);
55 auto f = distances.
find(frame->frame->getName());
56 if (f == distances.
end())
SignedDistance distance(StatePtr &state) override
Computes the signed distance of a scene to collision.
Eigen::Vector2d normal
Normal vector to collision.
A shared pointer wrapper for se2ez::Robot::FrameData.
A collisions manager that uses Box2D as the underlying collision checking engine. ...
A class that contains all information about the signed distance of a frame to another.
Eigen::Vector2d point
Point on fixture where normal begins.
std::string printVector(const Eigen::VectorXd &v, unsigned int precision=4)
Returns a string of a vector's contents.
std::string format(const std::string &fmt, Args &&... args)
SE2EZ_EIGEN_CLASS double distance
Distance to collision.
bool collide(StatePtr &state) override
Check if a state is in collision.
Floating joint, free movement in SE(2). Uses Euclidean metric.