Skip to content

Commit

Permalink
Revert "Smoothly move an Odometry's path given a moving frame_id (ros…
Browse files Browse the repository at this point in the history
…-visualization#1631)"

This reverts commit a6e58df.
  • Loading branch information
rhaschke committed Sep 24, 2021
1 parent 29c2497 commit 723a387
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 282 deletions.
31 changes: 10 additions & 21 deletions src/rviz/default_plugin/odometry_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,16 @@ void OdometryDisplay::processMessage(const nav_msgs::Odometry::ConstPtr& message
}
}

Ogre::Vector3 position(message->pose.pose.position.x, message->pose.pose.position.y,
message->pose.pose.position.z);
Ogre::Quaternion orientation =
Ogre::Quaternion(message->pose.pose.orientation.w, message->pose.pose.orientation.x,
message->pose.pose.orientation.y, message->pose.pose.orientation.z);
Ogre::Vector3 position;
Ogre::Quaternion orientation;
if (!context_->getFrameManager()->transform(message->header, message->pose.pose, position, orientation))
{
ROS_ERROR("Error transforming odometry '%s' from frame '%s' to frame '%s'", qPrintable(getName()),
message->header.frame_id.c_str(), qPrintable(fixed_frame_));
return;
}

// If we arrive here, we're good. Continue...

// Create a scene node, and attach the arrow and the covariance to it
Axes* axes = new Axes(scene_manager_, scene_node_, axes_length_property_->getFloat(),
Expand Down Expand Up @@ -367,22 +372,6 @@ void OdometryDisplay::update(float /*wall_dt*/, float /*ros_dt*/)

assert(arrows_.size() == axes_.size());
assert(axes_.size() == covariance_property_->sizeVisual());

// applyTransforms
if (!last_used_message_)
return;

Ogre::Vector3 position;
Ogre::Quaternion orientation;
if (!context_->getFrameManager()->getTransform(last_used_message_->header.frame_id, ros::Time(),
position, orientation))
{
// the error output with setStatus is already generated by MessageFilterDisplay
return;
}

scene_node_->setPosition(position);
scene_node_->setOrientation(orientation);
}

void OdometryDisplay::reset()
Expand Down
96 changes: 0 additions & 96 deletions src/test/odometry.py

This file was deleted.

165 changes: 0 additions & 165 deletions src/test/odometry.rviz

This file was deleted.

0 comments on commit 723a387

Please sign in to comment.