Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laeRobot.cxx File Reference

Laelaps Robot Class implementation. More...

#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
#include <map>
#include "rnr/rnrconfig.h"
#include "rnr/units.h"
#include "rnr/i2c.h"
#include "rnr/log.h"
#include "Laelaps/laelaps.h"
#include "Laelaps/laeUtils.h"
#include "Laelaps/laeSysDev.h"
#include "Laelaps/RoboClaw.h"
#include "Laelaps/laeMotor.h"
#include "Laelaps/laeI2C.h"
#include "Laelaps/laeI2CMux.h"
#include "Laelaps/laeWatchDog.h"
#include "Laelaps/laeWd.h"
#include "Laelaps/laeVL6180.h"
#include "Laelaps/laeImu.h"
#include "Laelaps/laeCams.h"
#include "Laelaps/laeTune.h"
#include "Laelaps/laeDesc.h"
#include "Laelaps/laeXmlTune.h"
#include "Laelaps/laeDb.h"
#include "Laelaps/laeTraj.h"
#include "Laelaps/laePowertrain.h"
#include "Laelaps/laePlatform.h"
#include "Laelaps/laeKin.h"
#include "Laelaps/laeAlarms.h"
#include "Laelaps/laeReports.h"
#include "Laelaps/laeThreadAsync.h"
#include "Laelaps/laeThreadImu.h"
#include "Laelaps/laeThreadKin.h"
#include "Laelaps/laeThreadRange.h"
#include "Laelaps/laeThreadWd.h"
#include "Laelaps/laeRobot.h"

Go to the source code of this file.

Macros

#define LAE_TRY_NO_EXEC()
 Test for no execute flag. More...
 
#define LAE_TRY_CONN()
 Test for connection. More...
 
#define LAE_TRY_NOT_ESTOP()
 Test for not estop. More...
 

Detailed Description

Laelaps Robot Class implementation.

Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright
© 2015-2017. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved

Definition in file laeRobot.cxx.

Macro Definition Documentation

#define LAE_TRY_CONN ( )
Value:
do \
{ \
if( !isConnected() ) \
{ \
LOGERROR("Robot is not connected."); \
return -LAE_ECODE_NO_EXEC; \
} \
} while(0)

Test for connection.

Only works in LaeRobot methods.

Returns
On failure, forces return from calling function with the appropriate error code.

Definition at line 129 of file laeRobot.cxx.

Referenced by laelaps::LaeRobot::clearAlarms(), laelaps::LaeRobot::estop(), laelaps::LaeRobot::freeze(), laelaps::LaeRobot::getDynamics(), laelaps::LaeRobot::move(), laelaps::LaeRobot::release(), laelaps::LaeRobot::resetEStop(), laelaps::LaeRobot::setAuxPower(), and laelaps::LaeRobot::setDutyCycles().

#define LAE_TRY_NO_EXEC ( )
Value:
do \
{ \
if( m_bNoExec ) \
{ \
return LAE_OK; \
} \
} while(0)

Test for no execute flag.

Only works in LaeRobot methods.

Returns
On true, return with LAE_OK.

Definition at line 112 of file laeRobot.cxx.

Referenced by laelaps::LaeRobot::estop(), laelaps::LaeRobot::freeze(), laelaps::LaeRobot::release(), and laelaps::LaeRobot::resetEStop().

#define LAE_TRY_NOT_ESTOP ( )
Value:
do \
{ \
if( m_bIsEStopped ) \
{ \
LOGERROR("Robot is emergency stopped."); \
return -LAE_ECODE_NO_EXEC; \
} \
} while(0)

Test for not estop.

Only works in LaeRobot methods.

Returns
On failure, forces return from calling function with the appropriate error code.

Definition at line 147 of file laeRobot.cxx.