Skip to content
Snippets Groups Projects
Commit 6f836688 authored by Fabian Reister's avatar Fabian Reister
Browse files

robot state component: using new interface

parent 054eb668
No related branches found
No related tags found
1 merge request!124new types: PoseStamped and VelocityStamped
......@@ -344,9 +344,7 @@ namespace armarx
void
RobotStateComponent::reportGlobalRobotPose(
const std::string& robotName,
const Eigen::Matrix4f& pose,
const long timestamp,
const TransformStamped& globalRobotPose,
const Ice::Current&)
{
if (_synchronized)
......@@ -355,7 +353,7 @@ namespace armarx
ARMARX_DEBUG << "Comparing " << localRobotName << " and " << robotName << ".";
if (localRobotName == robotName)
{
const IceUtil::Time time = IceUtil::Time::microSeconds(timestamp);
const IceUtil::Time time = IceUtil::Time::microSeconds(globalRobotPose.header.timestampInMicroSeconds);
insertPose(time, pose);
_synchronized->setGlobalPose(pose);
......@@ -373,34 +371,6 @@ namespace armarx
}
void RobotStateComponent::reportPlatformPose(const PoseStamped& platformPose, const Current&)
{
IceUtil::Time time = IceUtil::Time::microSeconds(platformPose.header.timestampInMicroSeconds);
insertPose(time, platformPose.pose.matrix());
if (_sharedRobotServant)
{
_sharedRobotServant->setTimestamp(time);
}
}
void RobotStateComponent::reportNewTargetPose(const PoseStamped&, const Current&)
{
// Unused.
}
void RobotStateComponent::reportPlatformVelocity(const VelocityStamped&, const Current&)
{
// Unused.
}
void RobotStateComponent::reportPlatformOdometryPose(const PoseStamped&, const Current&)
{
// Unused.
}
std::vector<std::string> RobotStateComponent::getArmarXPackages(const Current&) const
{
std::vector<std::string> result;
......
......@@ -122,19 +122,7 @@ namespace armarx
RobotInfoNodePtr getRobotInfo(const Ice::Current&) const override;
// GlobalRobotPoseLocalizationListener
void reportGlobalRobotPose(const std::string& robotName, const Eigen::Matrix4f& pose, long timestamp, const Ice::Current& = Ice::Current()) override;
// PlatformUnitListener interface
// TODO: Remove this interface and use GlobalRobotPoseLocalizationListener instead.
/// Stores the platform pose in the pose history.
void reportPlatformPose(const PoseStamped& platformPose, const Ice::Current&) override;
/// Does nothing.
void reportNewTargetPose(const PoseStamped& targetPose, const Ice::Current&) override;
/// Does nothing.
void reportPlatformVelocity(const VelocityStamped& platformPose, const Ice::Current&) override;
/// Does nothing.
void reportPlatformOdometryPose(const PoseStamped& odometryPose, const Ice::Current&) override;
void reportGlobalRobotPose(const TransformStamped& globalRobotPose, const Ice::Current& = Ice::Current()) override;
// Own interface.
void setRobotStateObserver(RobotStateObserverPtr observer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment