Skip to content
Snippets Groups Projects
Commit bcda34fc authored by Raphael Grimm's avatar Raphael Grimm
Browse files

FramedPosition now has manually written copy ctor + assign

in ATINetFTUnit.cpp vector::size is used
parent 6202aa7e
No related branches found
No related tags found
No related merge requests found
...@@ -119,8 +119,8 @@ void ATINetFTUnit::periodicExec() ...@@ -119,8 +119,8 @@ void ATINetFTUnit::periodicExec()
} }
else else
{ {
convertToFTValues(receivePacketContent.data(), ftdata.data(), ftDataSize); convertToFTValues(receivePacketContent.data(), ftdata.data(), ftdata.size());
writeFTValuesToFile(ftdata.data(), ftDataSize); writeFTValuesToFile(ftdata.data(), ftdata.size());
sampleIndex++; sampleIndex++;
} }
...@@ -146,7 +146,7 @@ void ATINetFTUnit::startRecording(const std::string& customName, const Ice::Curr ...@@ -146,7 +146,7 @@ void ATINetFTUnit::startRecording(const std::string& customName, const Ice::Curr
*(uint16_t*)&bytePacket[0] = htons(0x1234); /* standard header. */ *(uint16_t*)&bytePacket[0] = htons(0x1234); /* standard header. */
*(uint16_t*)&bytePacket[2] = htons(2); /* per table 9.1 in Net F/T user manual. */ *(uint16_t*)&bytePacket[2] = htons(2); /* per table 9.1 in Net F/T user manual. */
*(uint32_t*)&bytePacket[4] = htonl(0); /* see section 9.1 in Net F/T user manual. */ *(uint32_t*)&bytePacket[4] = htonl(0); /* see section 9.1 in Net F/T user manual. */
recordingStarted = sendPacket(bytePacket.data(), bpSize); recordingStarted = sendPacket(bytePacket.data(), bytePacket.size());
if (recordingStarted) if (recordingStarted)
{ {
...@@ -171,7 +171,7 @@ void ATINetFTUnit::stopRecording(const Ice::Current& c) ...@@ -171,7 +171,7 @@ void ATINetFTUnit::stopRecording(const Ice::Current& c)
*(uint16_t*)&bytePacket[2] = htons(0); /* per table 9.1 in Net F/T user manual. */ *(uint16_t*)&bytePacket[2] = htons(0); /* per table 9.1 in Net F/T user manual. */
*(uint32_t*)&bytePacket[4] = htonl(0); /* see section 9.1 in Net F/T user manual. */ *(uint32_t*)&bytePacket[4] = htonl(0); /* see section 9.1 in Net F/T user manual. */
recordingStopped = sendPacket(bytePacket.data(), bpSize); recordingStopped = sendPacket(bytePacket.data(), bytePacket.size());
if (recordingStopped) if (recordingStopped)
{ {
recordingFile.close(); recordingFile.close();
......
...@@ -157,9 +157,23 @@ namespace armarx ...@@ -157,9 +157,23 @@ namespace armarx
FramedPosition(const Eigen::Vector3f&, const std::string& frame, const std::string& agent); FramedPosition(const Eigen::Vector3f&, const std::string& frame, const std::string& agent);
FramedPosition(const Eigen::Matrix4f&, const std::string& frame, const std::string& agent); FramedPosition(const Eigen::Matrix4f&, const std::string& frame, const std::string& agent);
//FramedPosition(const Vector3BasePtr pos, const std::string &frame ); // this doesnt work for unknown reasons //FramedPosition(const Vector3BasePtr pos, const std::string &frame ); // this doesnt work for unknown reasons
FramedPosition(const FramedPosition& other) = default; FramedPosition(const FramedPosition& other):
Shared(other),
Vector3Base(other.x, other.y, other.z),
FramedPositionBase(other.x, other.y, other.z, other.frame, other.agent),
Vector3(other.x, other.y, other.z)
{
}
FramedPosition& operator=(const armarx::FramedPosition&) = default; FramedPosition& operator=(const armarx::FramedPosition& other)
{
x = other.x;
y = other.y;
z = other.z;
frame = other.frame;
agent = other.agent;
return *this;
}
std::string getFrame() const; std::string getFrame() const;
......
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