Skip to content

Commit

Permalink
Fixed: mrpt::reactivenav::CReactiveNavigationSystem and mrpt::reactiv…
Browse files Browse the repository at this point in the history
…enav::CReactiveNavigationSystem3D didn't obey the "enableConsoleOutput" constructor flag
  • Loading branch information
jlblancoc committed Dec 7, 2013
1 parent 6481ce7 commit db7b0e7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
18 changes: 12 additions & 6 deletions libs/reactivenav/src/CReactiveNavigationSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void CReactiveNavigationSystem::performNavigationStep()
{
m_robot.stop();
m_navigationState = IDLE;
printf_debug("Navigation target was reached!\n" );
if (m_enableConsoleOutput) printf_debug("Navigation target was reached!\n" );

if (!navigationEndEventSent)
{
Expand Down Expand Up @@ -641,26 +641,32 @@ void CReactiveNavigationSystem::performNavigationStep()
timerForExecutionPeriod.Tic();


printf_debug("CMD:%.02lfm/s,%.02lfd/s \t",
if (m_enableConsoleOutput)
{
printf_debug("CMD:%.02lfm/s,%.02lfd/s \t",
(double)cmd_v,
(double)RAD2DEG( cmd_w ) );

printf_debug(" T=%.01lfms Exec:%.01lfms|%.01lfms \t",
printf_debug(" T=%.01lfms Exec:%.01lfms|%.01lfms \t",
1000.0*meanExecutionPeriod,
1000.0*meanExecutionTime,
1000.0*meanTotalExecutionTime );
}

if (!skipNormalReactiveNavigation)
{
printf_debug("E=%.01lf ", (double)selectedHolonomicMovement.evaluation );
printf_debug("PTG#%i ", nSelectedPTG);
if (m_enableConsoleOutput)
{
printf_debug("E=%.01lf ", (double)selectedHolonomicMovement.evaluation );
printf_debug("PTG#%i ", nSelectedPTG);
}
}
else
{
nSelectedPTG = 0;
}

printf_debug("\n");
if (m_enableConsoleOutput) printf_debug("\n");

// ---------------------------------------
// Generate log record
Expand Down
18 changes: 12 additions & 6 deletions libs/reactivenav/src/CReactiveNavigationSystem3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ void CReactiveNavigationSystem3D::performNavigationStep()
{
m_robot.stop();
m_navigationState = IDLE;
printf_debug("Navigation target was reached!\n" );
if (m_enableConsoleOutput) printf_debug("Navigation target was reached!\n" );

if (!navigationEndEventSent)
{
Expand Down Expand Up @@ -582,26 +582,32 @@ void CReactiveNavigationSystem3D::performNavigationStep()
timerForExecutionPeriod.Tic();


printf_debug("CMD:%.02lfm/s,%.02lfd/s \t",
if (m_enableConsoleOutput)
{
printf_debug("CMD:%.02lfm/s,%.02lfd/s \t",
(double)new_cmd_v,
(double)RAD2DEG( new_cmd_w ) );

printf_debug(" T=%.01lfms Exec:%.01lfms|%.01lfms \t",
printf_debug(" T=%.01lfms Exec:%.01lfms|%.01lfms \t",
1000.0*meanExecutionPeriod,
1000.0*meanExecutionTime,
1000.0*meanTotalExecutionTime );
}

if (!skipNormalReactiveNavigation)
{
printf_debug("E=%.01lf ", (double)selectedHolonomicMovement.evaluation );
printf_debug("PTG#%i ", nSelectedPTG);
if (m_enableConsoleOutput)
{
printf_debug("E=%.01lf ", (double)selectedHolonomicMovement.evaluation );
printf_debug("PTG#%i ", nSelectedPTG);
}
}
else
{
nSelectedPTG = 0;
}

printf_debug("\n");
if (m_enableConsoleOutput) printf_debug("\n");


// ---------------------------------------
Expand Down

0 comments on commit db7b0e7

Please sign in to comment.