-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/Pitch Roll Estimator #314
Conversation
…oJackets/roboracing-software into feat-302/pitch-roll-estimate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea here. However, to accomplish your goal I think you'll have to extend the CameraGeometry class in two ways: 1) adding a SetOrientation or SetPose method and 2) changing ProjectToWorld so that it actually uses the roll information.
std::tuple<bool, geometry_msgs::Point> CameraGeometry::ProjectToWorld(int row, int col) { |
quat_tf -= initial_axes; | ||
|
||
// Convert back | ||
cam_geom_.GetCameraPose().orientation = tf2::toMsg(quat_tf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetCameraPose returns a Pose by value, so I would be surprised if line 97 actually changes the internal state of cam_geom_
if (!axes_init) { | ||
// Set the initial axes | ||
tf2::convert(cam_geom_.GetCameraPose().orientation, initial_axes); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this assume that the car is upright and flat when the node is launched? That's fine as long as it's documented
I think this class in a ROS package does the 3D geometry stuff right, but like my CameraGeometry class, it only updates through TF which might be too slow for "real-time" reactions to our pitch and roll. http://docs.ros.org/melodic/api/image_geometry/html/c++/classimage__geometry_1_1PinholeCameraModel.html Here is my recommendation: fix CameraGeometry so that a user can change its orientation and/or pose, but continue to ignore the roll dimension in ProjectToWorld. I would expect more of our present error to come from ignoring pitch than from ignoring roll. Then proper 3D point projection (simplified raycasting) can be added in later if it's still needed |
Going to close this for now (a bit stale) and link it in the issue. |
Closes #302
Adds functionality to improve our pointcloud projector. Uses the IMU to read in the axes and updates the camera pose to reflect the rotation of the chassis (pitch and roll primarily due to the suspension moving). These updates are propagated through the pointcloud projector.