Skip to content
Snippets Groups Projects
Commit 25f9e511 authored by andreeatulbure's avatar andreeatulbure
Browse files

rename part 2

parent 7c31473b
No related branches found
No related tags found
No related merge requests found
Showing
with 87 additions and 87 deletions
......@@ -22,4 +22,4 @@ add_subdirectory(InertialMeasurementUnitObserver)
add_subdirectory(ViewSelection)
add_subdirectory(SensorPackageUnit)
add_subdirectory(OrientedTactileSensorUnit)
armarx_component_set_name("SensorPackageUnitApp")
armarx_component_set_name("OrientedTactileSensorUnitApp")
find_package(Eigen3 QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available")
......@@ -8,7 +8,7 @@ if (Eigen3_FOUND)
${Eigen3_INCLUDE_DIR})
endif()
set(COMPONENT_LIBS RobotAPIUnits SensorPackage )
set(COMPONENT_LIBS RobotAPIUnits OrientedTactileSensor )
set(EXE_SOURCE main.cpp)
......
#include <ArmarXCore/core/application/Application.h>
#include <RobotAPI/drivers/SensorPackage/SensorPackageUnit.h>
#include <RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.h>
#include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[])
{
return armarx::runSimpleComponentApp < armarx::SensorPackageUnit > (argc, argv, "SensorPackageUnit");
return armarx::runSimpleComponentApp < armarx::OrientedTactileSensorUnit > (argc, argv, "OrientedTactileSensorUnit");
}
add_subdirectory(WeissHapticSensor)
add_subdirectory(XsensIMU)
add_subdirectory(SensorPackage)
add_subdirectory(OrientedTactileSensor)
armarx_set_target("SensorPackage Library: SensorPackage")
armarx_set_target("OrientedTactileSensor Library: OrientedTactileSensor")
find_package(Eigen3 QUIET)
......@@ -9,17 +9,17 @@ if (Eigen3_FOUND)
${Eigen3_INCLUDE_DIR})
endif()
set(LIB_NAME SensorPackage)
set(LIB_NAME OrientedTactileSensor)
set(LIBS RobotAPIUnits ArmarXCoreObservers ArmarXCoreEigen3Variants)
set(LIB_FILES
SensorPackageUnit.cpp
OrientedTactileSensorUnit.cpp
)
set(LIB_HEADERS
SensorPackageUnit.h
OrientedTactileSensorUnit.h
)
armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
#include "SensorPackageUnit.h"
#include "OrientedTactileSensorUnit.h"
#include <termios.h>
#include <sys/ioctl.h>
#include <fcntl.h>
......@@ -6,14 +6,14 @@
using namespace armarx;
SensorPackageUnit::SensorPackageUnit()
OrientedTactileSensorUnit::OrientedTactileSensorUnit()
{
}
void SensorPackageUnit::onInitComponent()
void OrientedTactileSensorUnit::onInitComponent()
{
offeringTopic("SensorPackageUnit");
offeringTopic("OrientedTactileSensorUnit");
//open serial port
std::string portname = getProperty<std::string>("SerialInterfaceDevice").getValue();
......@@ -60,26 +60,26 @@ void SensorPackageUnit::onInitComponent()
ARMARX_INFO << "IMU calibration finished";
readTask = new RunningTask<SensorPackageUnit>(this, &SensorPackageUnit::run);
readTask = new RunningTask<OrientedTactileSensorUnit>(this, &OrientedTactileSensorUnit::run);
readTask->start();
}
void SensorPackageUnit::onConnectComponent()
void OrientedTactileSensorUnit::onConnectComponent()
{
//std::string topicName = getProperty<std::string>("ArduinoIMUUnit").getValue();
std::string topicName = getProperty<std::string>("TopicName").getValue();
listenerSensorPackage = getTopic<SensorPackageUnitListenerPrx>(topicName);
listenerOrientedTactileSensor = getTopic<OrientedTactileSensorUnitListenerPrx>(topicName);
ARMARX_INFO << "Topic Name given" << flush;
}
PropertyDefinitionsPtr SensorPackageUnit::createPropertyDefinitions()
PropertyDefinitionsPtr OrientedTactileSensorUnit::createPropertyDefinitions()
{
return PropertyDefinitionsPtr(new SensorPackageUnitPropertyDefinitions(
return PropertyDefinitionsPtr(new OrientedTactileSensorUnitPropertyDefinitions(
getConfigIdentifier()));
}
void SensorPackageUnit::run()
void OrientedTactileSensorUnit::run()
{
while (readTask->isRunning())
{
......@@ -108,7 +108,7 @@ void SensorPackageUnit::run()
}
// get imu values from incoming string
SensorPackageUnit::SensorData SensorPackageUnit::getValues(std::string line)
OrientedTactileSensorUnit::SensorData OrientedTactileSensorUnit::getValues(std::string line)
{
SensorData data;
std::vector<std::string> splitValues;
......
......@@ -3,7 +3,7 @@
#include <ArmarXCore/core/Component.h>
#include <RobotAPI/interface/units/UnitInterface.h>
#include <RobotAPI/interface/units/SensorPackageUnit.h> //.ice for datastructure
#include <RobotAPI/interface/units/OrientedTactileSensorUnit.h> //.ice for datastructure
#include <ArmarXCore/core/services/tasks/PeriodicTask.h>
#include <ArmarXCore/core/services/tasks/RunningTask.h>
#include <netinet/in.h>
......@@ -14,11 +14,11 @@
namespace armarx
{
class SensorPackageUnitPropertyDefinitions:
class OrientedTactileSensorUnitPropertyDefinitions:
public ComponentPropertyDefinitions
{
public:
SensorPackageUnitPropertyDefinitions(std::string prefix):
OrientedTactileSensorUnitPropertyDefinitions(std::string prefix):
ComponentPropertyDefinitions(prefix)
{
defineOptionalProperty<std::string>(
......@@ -28,27 +28,27 @@ namespace armarx
defineOptionalProperty<std::string>(
"TopicName",
"SensorPackageUnit",
"OrientedTactileSensorUnit",
"Name of the topic on which the sensor values are provided");
}
};
/**
* @class SensorPackageUnit
* @class OrientedTactileSensorUnit
* @brief ArmarX wrapper for an arduino due with one BNO055 IMU and one BMP280 pressure sensor
*
*/
class SensorPackageUnit:
class OrientedTactileSensorUnit:
virtual public armarx::Component
//virtual public MMMCaptureSensorInterface
{
public:
SensorPackageUnit();
OrientedTactileSensorUnit();
virtual std::string getDefaultName() const
{
return "SensorPackageUnit";
return "OrientedTactileSensorUnit";
}
struct SensorData
......@@ -68,8 +68,8 @@ namespace armarx
std::fstream arduino;
//std::ofstream outputFile;
//Mutex fileMutex;
RunningTask<SensorPackageUnit>::pointer_type readTask;
SensorPackageUnitListenerPrx listenerSensorPackage;
RunningTask<OrientedTactileSensorUnit>::pointer_type readTask;
OrientedTactileSensorUnitListenerPrx listenerOrientedTactileSensor;
//void periodicExec();
void run();
......
......@@ -34,7 +34,7 @@ set(SLICE_FILES
units/TCPMoverUnitInterface.ice
units/UnitInterface.ice
units/ATINetFTUnit.ice
units/SensorPackageUnit.ice
units/OrientedTactileSensorUnit.ice
components/ViewSelectionInterface.ice
......
......@@ -38,7 +38,7 @@ module armarx
};
interface SensorPackageUnitInterface extends SensorActorUnitInterface
interface OrientedTactileSensorUnitInterface extends SensorActorUnitInterface
{
//void startRecording(string customName);
......@@ -47,14 +47,14 @@ module armarx
bool isComponentOnline();
};
interface SensorPackageUnitListener
interface OrientedTactileSensorUnitListener
{
void reportSensorValues(int id, float pressure, float qw, float qx, float qy, float qz);
};
interface SensorPackageUnitObserverInterface extends ObserverInterface, SensorPackageUnitListener
interface OrientedTactileSensorUnitObserverInterface extends ObserverInterface, OrientedTactileSensorUnitListener
{
};
......
......@@ -3,4 +3,4 @@ add_subdirectory(operations)
add_subdirectory(WeissHapticGroup)
add_subdirectory(StatechartProfilesTestGroup)
add_subdirectory(SensorPackageGroup)
\ No newline at end of file
add_subdirectory(OrientedTactileSensorGroup)
\ No newline at end of file
armarx_component_set_name("SensorPackageGroup")
armarx_component_set_name("OrientedTactileSensorGroup")
#find_package(MyLib QUIET)
#armarx_build_if(MyLib_FOUND "MyLib not available")
......@@ -31,17 +31,17 @@ set(COMPONENT_LIBS
# Sources
set(SOURCES
SensorPackageGroupRemoteStateOfferer.cpp
./SensorPackageTest.cpp
OrientedTactileSensorGroupRemoteStateOfferer.cpp
./OrientedTactileSensorTest.cpp
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
)
set(HEADERS
SensorPackageGroupRemoteStateOfferer.h
SensorPackageGroup.scgxml
./SensorPackageTest.h
OrientedTactileSensorGroupRemoteStateOfferer.h
OrientedTactileSensorGroup.scgxml
./OrientedTactileSensorTest.h
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
./SensorPackageTest.xml
./OrientedTactileSensorTest.xml
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.xml
)
......
<?xml version="1.0" encoding="utf-8"?>
<StatechartGroup name="SensorPackageGroup" package="RobotAPI" generateContext="true">
<StatechartGroup name="OrientedTactileSensorGroup" package="RobotAPI" generateContext="true">
<Proxies/>
<Configurations/>
<State filename="SensorPackageTest.xml" visibility="public"/>
<State filename="OrientedTactileSensorTest.xml" visibility="public"/>
</StatechartGroup>
......@@ -13,53 +13,53 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::SensorPackageGroup::SensorPackageGroupRemoteStateOfferer
* @package RobotAPI::OrientedTactileSensorGroup::OrientedTactileSensorGroupRemoteStateOfferer
* @author andreeatulbure ( andreea_tulbure at yahoo dot de )
* @date 2017
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include "SensorPackageGroupRemoteStateOfferer.h"
#include "OrientedTactileSensorGroupRemoteStateOfferer.h"
using namespace armarx;
using namespace SensorPackageGroup;
using namespace OrientedTactileSensorGroup;
// DO NOT EDIT NEXT LINE
SensorPackageGroupRemoteStateOfferer::SubClassRegistry SensorPackageGroupRemoteStateOfferer::Registry(SensorPackageGroupRemoteStateOfferer::GetName(), &SensorPackageGroupRemoteStateOfferer::CreateInstance);
OrientedTactileSensorGroupRemoteStateOfferer::SubClassRegistry OrientedTactileSensorGroupRemoteStateOfferer::Registry(OrientedTactileSensorGroupRemoteStateOfferer::GetName(), &OrientedTactileSensorGroupRemoteStateOfferer::CreateInstance);
SensorPackageGroupRemoteStateOfferer::SensorPackageGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader) :
XMLRemoteStateOfferer < SensorPackageGroupStatechartContext > (reader)
OrientedTactileSensorGroupRemoteStateOfferer::OrientedTactileSensorGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader) :
XMLRemoteStateOfferer < OrientedTactileSensorGroupStatechartContext > (reader)
{
}
void SensorPackageGroupRemoteStateOfferer::onInitXMLRemoteStateOfferer()
void OrientedTactileSensorGroupRemoteStateOfferer::onInitXMLRemoteStateOfferer()
{
}
void SensorPackageGroupRemoteStateOfferer::onConnectXMLRemoteStateOfferer()
void OrientedTactileSensorGroupRemoteStateOfferer::onConnectXMLRemoteStateOfferer()
{
}
void SensorPackageGroupRemoteStateOfferer::onExitXMLRemoteStateOfferer()
void OrientedTactileSensorGroupRemoteStateOfferer::onExitXMLRemoteStateOfferer()
{
}
// DO NOT EDIT NEXT FUNCTION
std::string SensorPackageGroupRemoteStateOfferer::GetName()
std::string OrientedTactileSensorGroupRemoteStateOfferer::GetName()
{
return "SensorPackageGroupRemoteStateOfferer";
return "OrientedTactileSensorGroupRemoteStateOfferer";
}
// DO NOT EDIT NEXT FUNCTION
XMLStateOffererFactoryBasePtr SensorPackageGroupRemoteStateOfferer::CreateInstance(StatechartGroupXmlReaderPtr reader)
XMLStateOffererFactoryBasePtr OrientedTactileSensorGroupRemoteStateOfferer::CreateInstance(StatechartGroupXmlReaderPtr reader)
{
return XMLStateOffererFactoryBasePtr(new SensorPackageGroupRemoteStateOfferer(reader));
return XMLStateOffererFactoryBasePtr(new OrientedTactileSensorGroupRemoteStateOfferer(reader));
}
......
......@@ -13,28 +13,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::SensorPackageGroup
* @package RobotAPI::OrientedTactileSensorGroup
* @author andreeatulbure ( andreea_tulbure at yahoo dot de )
* @date 2017
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#ifndef _ARMARX_XMLUSERCODE_RobotAPI_SensorPackageGroup_REMOTESTATEOFFERER_H
#define _ARMARX_XMLUSERCODE_RobotAPI_SensorPackageGroup_REMOTESTATEOFFERER_H
#ifndef _ARMARX_XMLUSERCODE_RobotAPI_OrientedTactileSensorGroup_REMOTESTATEOFFERER_H
#define _ARMARX_XMLUSERCODE_RobotAPI_OrientedTactileSensorGroup_REMOTESTATEOFFERER_H
#include <ArmarXCore/statechart/xmlstates/XMLRemoteStateOfferer.h>
#include "SensorPackageGroupStatechartContext.generated.h"
#include "OrientedTactileSensorGroupStatechartContext.generated.h"
namespace armarx
{
namespace SensorPackageGroup
namespace OrientedTactileSensorGroup
{
class SensorPackageGroupRemoteStateOfferer :
virtual public XMLRemoteStateOfferer < SensorPackageGroupStatechartContext > // Change this statechart context if you need another context (dont forget to change in the constructor as well)
class OrientedTactileSensorGroupRemoteStateOfferer :
virtual public XMLRemoteStateOfferer < OrientedTactileSensorGroupStatechartContext > // Change this statechart context if you need another context (dont forget to change in the constructor as well)
{
public:
SensorPackageGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader);
OrientedTactileSensorGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader);
// inherited from RemoteStateOfferer
void onInitXMLRemoteStateOfferer();
......
......@@ -13,26 +13,26 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::SensorPackageGroup
* @package RobotAPI::OrientedTactileSensorGroup
* @author andreeatulbure ( andreea_tulbure at yahoo dot de )
* @date 2017
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include "SensorPackageTest.h"
#include "OrientedTactileSensorTest.h"
using namespace armarx;
using namespace SensorPackageGroup;
using namespace OrientedTactileSensorGroup;
// DO NOT EDIT NEXT LINE
SensorPackageTest::SubClassRegistry SensorPackageTest::Registry(SensorPackageTest::GetName(), &SensorPackageTest::CreateInstance);
OrientedTactileSensorTest::SubClassRegistry OrientedTactileSensorTest::Registry(OrientedTactileSensorTest::GetName(), &OrientedTactileSensorTest::CreateInstance);
void SensorPackageTest::onEnter()
void OrientedTactileSensorTest::onEnter()
{
//SensorPackageGroupStatechartContext* context = getContext<SensorPackageGroupStatechartContext>();
//OrientedTactileSensorGroupStatechartContext* context = getContext<OrientedTactileSensorGroupStatechartContext>();
//HapticUnitObserverInterfacePrx hapticObserver = context->getHapticObserver();
//ChannelRegistry channels = hapticObserver->getAvailableChannels(false);
//std::map<std::string, DatafieldRefPtr> tactileDatafields_MaximumValueMap;
......@@ -40,7 +40,7 @@ void SensorPackageTest::onEnter()
//local.setTactileDatafields_MaximumValue(tactileDatafields_MaximumValueMap);
}
//void SensorPackageTest::run()
//void OrientedTactileSensorTest::run()
//{
// // put your user code for the execution-phase here
// // runs in seperate thread, thus can do complex operations
......@@ -53,13 +53,13 @@ void SensorPackageTest::onEnter()
// }
//}
//void SensorPackageTest::onBreak()
//void OrientedTactileSensorTest::onBreak()
//{
// // put your user code for the breaking point here
// // execution time should be short (<100ms)
//}
void SensorPackageTest::onExit()
void OrientedTactileSensorTest::onExit()
{
// put your user code for the exit point here
// execution time should be short (<100ms)
......@@ -67,8 +67,8 @@ void SensorPackageTest::onExit()
// DO NOT EDIT NEXT FUNCTION
XMLStateFactoryBasePtr SensorPackageTest::CreateInstance(XMLStateConstructorParams stateData)
XMLStateFactoryBasePtr OrientedTactileSensorTest::CreateInstance(XMLStateConstructorParams stateData)
{
return XMLStateFactoryBasePtr(new SensorPackageTest(stateData));
return XMLStateFactoryBasePtr(new OrientedTactileSensorTest(stateData));
}
......@@ -13,28 +13,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::SensorPackageGroup
* @package RobotAPI::OrientedTactileSensorGroup
* @author andreeatulbure ( andreea_tulbure at yahoo dot de )
* @date 2017
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#ifndef _ARMARX_XMLUSERCODE_RobotAPI_SensorPackageGroup_SensorPackageTest_H
#define _ARMARX_XMLUSERCODE_RobotAPI_SensorPackageGroup_SensorPackageTest_H
#ifndef _ARMARX_XMLUSERCODE_RobotAPI_OrientedTactileSensorGroup_OrientedTactileSensorTest_H
#define _ARMARX_XMLUSERCODE_RobotAPI_OrientedTactileSensorGroup_OrientedTactileSensorTest_H
#include <RobotAPI/statecharts/SensorPackageGroup/SensorPackageTest.generated.h>
#include <RobotAPI/statecharts/OrientedTactileSensorGroup/OrientedTactileSensorTest.generated.h>
namespace armarx
{
namespace SensorPackageGroup
namespace OrientedTactileSensorGroup
{
class SensorPackageTest :
public SensorPackageTestGeneratedBase <SensorPackageTest>
class OrientedTactileSensorTest :
public OrientedTactileSensorTestGeneratedBase <OrientedTactileSensorTest>
{
public:
SensorPackageTest(const XMLStateConstructorParams& stateData):
XMLStateTemplate <SensorPackageTest> (stateData), SensorPackageTestGeneratedBase <SensorPackageTest> (stateData)
OrientedTactileSensorTest(const XMLStateConstructorParams& stateData):
XMLStateTemplate <OrientedTactileSensorTest> (stateData), OrientedTactileSensorTestGeneratedBase <OrientedTactileSensorTest> (stateData)
{
}
......
<?xml version="1.0" encoding="utf-8"?>
<State version="1.2" name="SensorPackageTest" uuid="83D59864-EC09-4DA1-8773-7FF6D0E74A6A" width="800" height="600" type="Normal State">
<State version="1.2" name="OrientedTactileSensorTest" uuid="83D59864-EC09-4DA1-8773-7FF6D0E74A6A" width="800" height="600" type="Normal State">
<InputParameters/>
<OutputParameters/>
<LocalParameters/>
......
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