Skip to content

Commit

Permalink
Made python binding of JointWaypoint accept JointState targets
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSchneider42 committed May 27, 2024
1 parent c610d30 commit d87f5f9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,25 +747,25 @@ PYBIND11_MODULE(_franky, m) {
"return_when_finished"_a = true,
"finish_wait_factor"_a = 1.2);

py::class_<Waypoint<Vector7d>>(m, "JointWaypoint")
py::class_<Waypoint<JointState>>(m, "JointWaypoint")
.def(py::init<>(
[](
const Vector7d &target,
const JointState &target,
ReferenceType reference_type,
RelativeDynamicsFactor relative_dynamics_factor,
std::optional<double> minimum_time) {
return Waypoint<Vector7d>{
return Waypoint<JointState>{
target, reference_type, relative_dynamics_factor, minimum_time};
}
),
"target"_a,
py::arg_v("reference_type", ReferenceType::Absolute, "_franky.ReferenceType.Absolute"),
"relative_dynamics_factor"_a = 1.0,
"minimum_time"_a = std::nullopt)
.def_readonly("target", &Waypoint<Vector7d>::target)
.def_readonly("reference_type", &Waypoint<Vector7d>::reference_type)
.def_readonly("relative_dynamics_factor", &Waypoint<Vector7d>::relative_dynamics_factor)
.def_readonly("minimum_time", &Waypoint<Vector7d>::minimum_time);
.def_readonly("target", &Waypoint<JointState>::target)
.def_readonly("reference_type", &Waypoint<JointState>::reference_type)
.def_readonly("relative_dynamics_factor", &Waypoint<JointState>::relative_dynamics_factor)
.def_readonly("minimum_time", &Waypoint<JointState>::minimum_time);

py::class_<JointWaypointMotion, Motion<franka::JointPositions>, std::shared_ptr<JointWaypointMotion>>(
m, "JointWaypointMotion")
Expand Down

0 comments on commit d87f5f9

Please sign in to comment.