MipResources::KheperaServerROS Class Reference

Khepera Interface using ROS libraries. More...

#include <RemKhepServerROS.h>

Inheritance diagram for MipResources::KheperaServerROS:

MIPObject

List of all members.

Public Member Functions

 KheperaServerROS (int argc, const char *argv[])
 Default constructor.
 KheperaServerROS (KheperaServerROSPars *khPars)
 Default constructor.
 ~KheperaServerROS ()
 Default destructor.
bool searchConnection ()
 Search for connection with a remote client.KheperaServer::.
void receiveCommands ()
 Receiving commands.
int parseCommands ()
 Parse commands.
void executeCommands ()
 Execute commands.
ROSNodegetRosNode ()
 Get the pointer to the current ROS node.
KorebotROSgetKorebot ()
 Get the pointer to the resource Korebot using ROS.
void getVelocityCommand (Decimal &xVel, Decimal &omega)
 Get the actual velocity commands.
void getTStateCommand (MotionModuleTState &state)
 Get the actual TState commands.
void lockLaserMutex ()
 Lock the laser mutex.
void unlockLaserMutex ()
 Unlock the laser mutex.


Detailed Description

Khepera Interface using ROS libraries.

Author:
Marco Cognetti

Constructor & Destructor Documentation

KheperaServerROS::KheperaServerROS ( int  argc,
const char *  argv[] 
)

Default constructor.

Parameters:
[in] argc Integer to be passed to ros::init
[in] argv Char to be passed to ros::init

LASER MANAGEMENT: IN GAZEBO CASE, LASER DATA ARE PUBLISHED BY LASER CONTROLLER. THERE ARE TWO SOLUTIONS 1) AN OUTPUT NODE PUBLISHES LASER DATA. IT COULD MAKE SENSE SINCE LASER IS A DIFFERENT DEVICE FROM THE ROBOT 2) IMPORT THE CONTROLLER DATA HERE AND PUBLISH DATA FROM HERE. IT IS MUCH HARDER. OBVIOUSLY, I WILL USE THE SECOND ONE.

KheperaServerROS::KheperaServerROS ( KheperaServerROSPars khPars  ) 

Default constructor.

LASER MANAGEMENT: IN GAZEBO CASE, LASER DATA ARE PUBLISHED BY LASER CONTROLLER. THERE ARE TWO SOLUTIONS 1) AN OUTPUT NODE PUBLISHES LASER DATA. IT COULD MAKE SENSE SINCE LASER IS A DIFFERENT DEVICE FROM THE ROBOT 2) IMPORT THE CONTROLLER DATA HERE AND PUBLISH DATA FROM HERE. IT IS MUCH HARDER. OBVIOUSLY, I WILL USE THE SECOND ONE.

KheperaServerROS::~KheperaServerROS (  ) 

Default destructor.


Member Function Documentation

bool KheperaServerROS::searchConnection (  ) 

Search for connection with a remote client.KheperaServer::.

void KheperaServerROS::receiveCommands (  ) 

Receiving commands.

int KheperaServerROS::parseCommands (  ) 

Parse commands.

Returns:
0 if the last commands is a velocity command; 1 if it is a tstate command, -1 if no valid command is received

void KheperaServerROS::executeCommands (  ) 

Execute commands.

HERE TWO OPPORTUNITIES

MipResources::ROSNode * KheperaServerROS::getRosNode (  ) 

Get the pointer to the current ROS node.

Returns:
ROSNode created in the constructor of this class

KorebotROS * KheperaServerROS::getKorebot (  ) 

Get the pointer to the resource Korebot using ROS.

Returns:
Pointer to KorebotROS

void KheperaServerROS::getVelocityCommand ( Decimal xVel,
Decimal omega 
)

Get the actual velocity commands.

Parameters:
[out] &xVel Velocity along x-axis of the robot (normally, along the moving direction of the robot
[out] &omega Angular velocity along z-axis of the robot

void KheperaServerROS::getTStateCommand ( MotionModuleTState state  ) 

Get the actual TState commands.

Parameters:
[out] state MotionModule where all information about the state will be saved

void KheperaServerROS::lockLaserMutex (  ) 

Lock the laser mutex.

void KheperaServerROS::unlockLaserMutex (  ) 

Unlock the laser mutex.


The documentation for this class was generated from the following files:

Generated on Mon Feb 20 07:01:12 2017 for MIP by  doxygen 1.5.6