40 eigenpy::StdPairConverter<CostItem>::registration();
41 eigenpy::VariantConverter<CostKey>::registration();
42 eigenpy::GenericMapVisitor<CostMap, true>::expose(
"CostMap");
46 bp::class_<CostStack, bp::bases<CostAbstract>>(
47 "CostStack",
"A weighted sum of other cost functions.", bp::no_init)
49 bp::init<
PolyManifold,
const int,
const std::vector<PolyCost> &,
50 const std::vector<Scalar> &>(
51 (
"self"_a,
"space",
"nu",
"components"_a = bp::list(),
52 "weights"_a = bp::list())))
53 .def(bp::init<const PolyCost &>((
"self"_a,
"cost")))
54 .def(bp::init<PolyManifold, int, const CostMap &>(
55 (
"self"_a,
"components"),
56 "Construct the CostStack from a CostMap object."))
58 "Components of this cost stack.")
68 (
"self"_a,
"key"), bp::return_internal_reference<>())
76 bp::return_internal_reference<>())
81 bp::return_internal_reference<>(),
82 (
"self"_a,
"cost",
"weight"_a = 1.))
87 return self.
addCost(key, cost, weight).first;
89 bp::return_internal_reference<>(),
90 (
"self"_a,
"key",
"cost",
"weight"_a = 1.))
92 "Number of cost components.")
98 bp::register_ptr_to_python<shared_ptr<CostStackData>>();
100 bp::class_<CostStackData, bp::bases<CostData>>(
101 "CostStackData",
"Data struct for CostStack.", bp::no_init)
102 .def_readonly(
"sub_cost_data", &CostStackData::sub_cost_data);
103 eigenpy::GenericMapVisitor<CostStackData::DataMap, true>::expose(
"CostMap");
CostAbstractTpl< Scalar > CostAbstract
ManifoldAbstractTpl< Scalar > Manifold
CostDataAbstractTpl< Scalar > CostData