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

Experimental graphslam engine #55

Merged
merged 19 commits into from Jun 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 10 additions & 8 deletions apps/RawLogViewer/main_convert_ops.cpp
Expand Up @@ -712,16 +712,18 @@ void xRawLogViewerFrame::OnMenuConvertObservationOnly(wxCommandEvent& event)
CActionCollectionPtr acts = CActionCollectionPtr( newObj );
// Get odometry:
CActionRobotMovement2DPtr actOdom = acts->getBestMovementEstimation();
ASSERT_(actOdom);
odometry_accum = odometry_accum + actOdom->poseChange->getMeanVal();
if (actOdom)
{
odometry_accum = odometry_accum + actOdom->poseChange->getMeanVal();

// Generate "odometry obs":
CObservationOdometryPtr newO = CObservationOdometry::Create();
newO->sensorLabel = "odometry";
newO->timestamp = actOdom->timestamp!=INVALID_TIMESTAMP ? actOdom->timestamp : lastValidObsTime;
newO->odometry = odometry_accum;
// Generate "odometry obs":
CObservationOdometryPtr newO = CObservationOdometry::Create();
newO->sensorLabel = "odometry";
newO->timestamp = actOdom->timestamp!=INVALID_TIMESTAMP ? actOdom->timestamp : lastValidObsTime;
newO->odometry = odometry_accum;

time_ordered_list_observation.insert( TTimeObservationPair( newO->timestamp, newO ));
time_ordered_list_observation.insert( TTimeObservationPair( newO->timestamp, newO ));
}
}
else
if ( newObj->GetRuntimeClass()->derivedFrom( CLASS_ID(CObservation) ) )
Expand Down
2 changes: 1 addition & 1 deletion apps/RawLogViewer/xRawLogViewerMain.cpp
Expand Up @@ -3688,7 +3688,7 @@ void xRawLogViewerFrame::OnDecimateRecords(wxCommandEvent& event)
// To free the memory of the current rawlog entries as we create the new one,
// then call "clearWithoutDelete" at the end.
// ------------------------------------------------------------------------------
CSensoryFramePtr last_sf ( CSerializablePtr( static_cast<CSerializable*>(NULL)) );
CSensoryFramePtr last_sf; // empty ptr
CActionRobotMovement2D::TMotionModelOptions odometryOptions;
bool cummMovementInit = false;
long SF_counter = 0;
Expand Down
26 changes: 26 additions & 0 deletions apps/icp-graph-slam/CMakeLists.txt
@@ -0,0 +1,26 @@
INCLUDE(../../cmakemodules/AssureCMakeRootFile.cmake) # Avoid user mistake in CMake source directory

#-----------------------------------------------------------------
# CMake file for the MRPT application: icp-graph-slam
# Feb 2014, Jose Luis Blanco
#-----------------------------------------------------------------
PROJECT(icp_graph_slam)

# ---------------------------------------------
# TARGET:
# ---------------------------------------------
SET(TMP_TARGET_NAME "icp-graph-slam")

# Define the executable target:
ADD_EXECUTABLE(${TMP_TARGET_NAME}
icp-graph-slam_main.cpp)

# Add the required libraries for linking:
TARGET_LINK_LIBRARIES(${TMP_TARGET_NAME} ${MRPT_LINKER_LIBS})

# Dependencies on MRPT libraries:
# Just mention the top-level dependency, the rest will be detected automatically,
# and all the needed #include<> dirs added (see the script DeclareAppDependencies.cmake for further details)
DeclareAppDependencies(${TMP_TARGET_NAME} mrpt-gui mrpt-graphslam)

DeclareAppForInstall(${TMP_TARGET_NAME})