Skip to content

Commit

Permalink
models(lua): Expose ego_position
Browse files Browse the repository at this point in the history
  • Loading branch information
cassava committed Apr 22, 2024
1 parent 089e081 commit 07b8856
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/include/cloe/component/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ struct Object {
usertype_table["velocity"] = &Object::velocity;
usertype_table["acceleration"] = &Object::acceleration;
usertype_table["angular_velocity"] = &Object::angular_velocity;
usertype_table["ego_position"] = +[](const Object &self, const Eigen::Isometry3d &sensorMountPose) {
Eigen::Vector3d pos = sensorMountPose * self.pose * self.cog_offset;
return pos;
};
}
};

Expand Down

0 comments on commit 07b8856

Please sign in to comment.