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

all segments with timestamp lookup

parent 7952ade4
No related branches found
No related tags found
No related merge requests found
......@@ -186,15 +186,17 @@ namespace armarx::armem::server::robot_state
if (p.enabled)
{
// TIMING_START(Visu);
TIMING_START(Visu);
// TODO(fabian.reister): use timestamp
const auto timestamp = IceUtil::Time::now();
try
{
const auto robotDescriptions = descriptionSegment.getRobotDescriptions();
const auto globalRobotPoseMap = localizationSegment.getRobotGlobalPoses();
const auto robotJointPositionMap = proprioceptionSegment.getRobotJointPositions();
const auto robotDescriptions = descriptionSegment.getRobotDescriptions(timestamp);
const auto globalRobotPoseMap = localizationSegment.getRobotGlobalPoses(timestamp);
const auto robotJointPositionMap = proprioceptionSegment.getRobotJointPositions(timestamp);
// we need all 3 informations:
......@@ -216,7 +218,7 @@ namespace armarx::armem::server::robot_state
ARMARX_DEBUG << "Done committing";
// TIMING_END_STREAM(Visu, ARMARX_VERBOSE);
TIMING_END_STREAM(Visu, ARMARX_VERBOSE);
// if (debugObserver)
// {
......
......@@ -105,7 +105,7 @@ namespace armarx::armem::server::robot_state::description
storeRobotDescription(robotDescription);
}
Segment::RobotDescriptionMap Segment::getRobotDescriptions() const
Segment::RobotDescriptionMap Segment::getRobotDescriptions(const armem::Time& timestamp) const
{
RobotDescriptionMap robotDescriptions;
......
......@@ -72,7 +72,7 @@ namespace armarx::armem::server::robot_state::description
/// mapping "robot name" -> "robot description"
using RobotDescriptionMap = std::unordered_map<std::string, robot::RobotDescription>;
RobotDescriptionMap getRobotDescriptions() const;
RobotDescriptionMap getRobotDescriptions(const armem::Time& timestamp) const;
private:
......
......@@ -89,7 +89,7 @@ namespace armarx::armem::server::robot_state::proprioception
robotUnitProviderID.providerSegmentName = providerSegmentName;
}
std::unordered_map<std::string, std::map<std::string, float>> Segment::getRobotJointPositions() const
std::unordered_map<std::string, std::map<std::string, float>> Segment::getRobotJointPositions(const armem::Time& timestamp) const
{
std::unordered_map<std::string, std::map<std::string, float>> jointMap;
......
......@@ -68,7 +68,7 @@ namespace armarx::armem::server::robot_state::proprioception
void init();
std::unordered_map<std::string, std::map<std::string, float>> getRobotJointPositions() const;
std::unordered_map<std::string, std::map<std::string, float>> getRobotJointPositions(const armem::Time& timestamp) const;
const armem::MemoryID& getRobotUnitProviderID() const;
......
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