maliput / delphyne

Scenario and search based Ego/Ado Car traffic simulations
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Agent.get_pose() binding failing #808

Closed francocipollone closed 3 years ago

francocipollone commented 3 years ago

delphyne_crash demo fails at the end of the execution because the binding to get the pose of the agent doesn't seem to be working correctly.

  File "/home/franco/maliput_ws/install/delphyne_demos/lib/python3.6/site-packages/delphyne_demos/demos/crash.py", line 59, in check_for_agent_collisions
    agent1_pose = agent1.get_pose()
TypeError: Unable to convert function return value to a Python type! The signature was
    (self: delphyne.agents.Agent) -> Eigen::Transform<double, 3, 1, 0>

c++ GetPose implementation:

https://github.com/ToyotaResearchInstitute/delphyne/blob/04e431f112b82f96b22b92966787d01b3ea03a48/include/delphyne/mi6/agent_base.h#L87-L102

get_pose bind

https://github.com/ToyotaResearchInstitute/delphyne/blob/04e431f112b82f96b22b92966787d01b3ea03a48/python/delphyne/agents.cc#L54-L57

francocipollone commented 3 years ago

Even though we are including the eigen bindings that pybind11 provides (pybind11/eigen.h)

We are returning drake::Isometry3<T> which is an alias:

template <typename Scalar>
using Isometry3 = Eigen::Transform<Scalar, 3, Eigen::Isometry>;

However that binding doesn't seem to be included in pybind11/eigen.h.