Skip to content
Snippets Groups Projects
Commit 5d917c59 authored by Johann Mantel's avatar Johann Mantel
Browse files

remove all the unnecessary code from loopOnce()

parent 65aa3878
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ namespace armarx
if (result == sick_scan::ExitSuccess) // OK -> loop again
{
ARMARX_INFO_S << "looping";
result = scanner->loopOnce();
result = scanner->loopOnce(scanData);
ARMARX_INFO_S << "finished looping";
}
else
......
......@@ -26,6 +26,7 @@
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/services/tasks/RunningTask.h>
#include <RobotAPI/interface/units/LaserScannerUnit.h>
// #include <ArmarXCore/libraries/ArmarXCoreComponentPlugins/DebugObserverComponentPlugin.h>
// #include <ArmarXGui/libraries/ArmarXGuiComponentPlugins/LightweightRemoteGuiComponentPlugin.h>
......@@ -72,9 +73,12 @@ namespace armarx
bool useTcp = false;
char colaDialectId = 'A';
//data and task pointers
std::vector<long> scanData;
std::vector<long> lengthData;
LaserScan scanData;
RunState runState = RunState::scannerFinalize;
RunningTask<SickLaserScanDevice>::pointer_type task;
sick_scan::SickScanConfig cfg;
SickScanAdapter* scanner;
//sick_scan::SickScanCommonTcp* scanner;
......
This diff is collapsed.
......@@ -36,6 +36,7 @@
#define SICK_TIM3XX_COMMON_TCP_H
#include <ArmarXCore/core/Component.h>
#include <RobotAPI/interface/units/LaserScannerUnit.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -70,10 +71,10 @@ namespace armarx
class SickScanAdapter : public sick_scan::SickScanCommon
{
public:
int loopOnce();
int loopOnce(LaserScan& scanData);
int parse_datagram(char* datagram, size_t datagram_length, sick_scan::SickScanConfig& config,
sensor_msgs::LaserScan& msg, int& numEchos, int& echoMask);
int parseDatagram(char* datagram, size_t datagram_length, sick_scan::SickScanConfig& config,
LaserScan& scanData, LaserScannerInfo& scanInfo, int& numEchos, int& echoMask, bool updateScannerInfo = false);
static void disconnectFunctionS(void* obj);
......
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