Skip to content
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

Add a extrapolator for poses. #430

Merged
merged 2 commits into from
Jul 26, 2017
Merged

Conversation

wohe
Copy link
Member

@wohe wohe commented Jul 26, 2017

This will be used in Cartographer ROS to extrapolate poses for tf.

PAIR=damonkohler

This will be used in Cartographer ROS to extrapolate poses for tf.

PAIR=damonkohler
@wohe wohe requested a review from ensonic July 26, 2017 12:08
void PoseExtrapolator::AddPose(const common::Time time,
const transform::Rigid3d& pose) {
timed_pose_queue_.push_back(TimedPose{time, pose});
while (timed_pose_queue_.size() > 2 &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not expect a method called Add* to pop items off the vector.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is consistent with the code base. The interesting fact is that this adds new pose information.

common::ToSeconds(last_time - timed_pose_queue_.front().time);
const transform::Rigid3d& last_pose = last_timed_pose.pose;
const Eigen::Vector3d linear_velocity =
(last_pose.translation() - timed_pose_queue_.front().pose.translation()) /
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you use a local var for last_timed_pose, maybe also do:
recent_timed_pose = timed_pose_queue_.front()

const transform::Rigid3d& last_pose = last_timed_pose.pose;
const Eigen::Vector3d linear_velocity =
(last_pose.translation() - timed_pose_queue_.front().pose.translation()) /
queue_delta;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be 0?

@wohe wohe merged commit 6035f63 into cartographer-project:master Jul 26, 2017
wohe added a commit to wohe/cartographer_ros that referenced this pull request Jul 26, 2017
Fixes cartographer-project/cartographer#102 for Cartographer ROS.
Direct users of the Cartographer library can make use of
cartographer-project/cartographer#430.
wohe added a commit to cartographer-project/cartographer_ros that referenced this pull request Jul 26, 2017
Fixes cartographer-project/cartographer#102 for Cartographer ROS.
Direct users of the Cartographer library can make use of
cartographer-project/cartographer#430.
ahundt added a commit to ahundt/cartographer that referenced this pull request Jul 27, 2017
* flatbuffers:
  flatbuffers versions of cartographer protos are now generated
  Add a extrapolator for poses. (cartographer-project#430)
  fix num submaps in trimmer_test (cartographer-project#424)
  Better tuning for 2D. (cartographer-project#428)
  Fix debug build (cartographer-project#418)
  Fix proto_stream to support 32-bit platforms. (cartographer-project#427)
  Draw Trajectories onto X-Rays and ProbabilityGrids. (cartographer-project#421)
jihoonl pushed a commit to magazino/cartographer_ros that referenced this pull request Jul 28, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 11, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 11, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 11, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 14, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Oct 2, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Oct 21, 2017
damienrg pushed a commit to damienrg/cartographer that referenced this pull request Nov 8, 2017
In the (non-offline) node, subscribing to the IMU topic was
controlled by the 2D options even for 3D SLAM. It now correctly
subscribes always similar to the offline node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants