ADD: added orientation
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -4,3 +4,6 @@
|
|||||||
[submodule "libs/json"]
|
[submodule "libs/json"]
|
||||||
path = libs/json
|
path = libs/json
|
||||||
url = https://github.com/nlohmann/json.git
|
url = https://github.com/nlohmann/json.git
|
||||||
|
[submodule "libs/whisper-com"]
|
||||||
|
path = libs/SimCore/libs/whisper-com
|
||||||
|
url = ssh://git@dev-gitea.ftewa.ti.unibw-hamburg.de:12000/hwinkel/whisper-com.git
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "SimCore/Messages/GroundThruthTrack.hpp"
|
#include "SimCore/Messages/GroundThruthTrack.hpp"
|
||||||
#include "SimCore/Messages/Track.hpp"
|
#include "SimCore/Messages/Track.hpp"
|
||||||
|
#include "SimCore/Orientation.hpp"
|
||||||
#include "SimCore/SafeMap.hpp"
|
#include "SimCore/SafeMap.hpp"
|
||||||
#include "SimCore/SimCore.hpp"
|
#include "SimCore/SimCore.hpp"
|
||||||
|
|
||||||
@@ -53,7 +54,8 @@ namespace Entities {
|
|||||||
std::uint32_t GroundTruthPort,
|
std::uint32_t GroundTruthPort,
|
||||||
std::uint32_t CommandPort,
|
std::uint32_t CommandPort,
|
||||||
std::string CommandIPAddress);
|
std::string CommandIPAddress);
|
||||||
// ~Entity();
|
~Entity();
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
@@ -67,6 +69,8 @@ namespace Entities {
|
|||||||
virtual void specificReloadCharacteristicts() = 0;
|
virtual void specificReloadCharacteristicts() = 0;
|
||||||
|
|
||||||
std::shared_ptr<SimCore::Position> ownShipPosition_ = nullptr;
|
std::shared_ptr<SimCore::Position> ownShipPosition_ = nullptr;
|
||||||
|
std::shared_ptr<SimCore::Orientation> ownShipOrientation_ = nullptr;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
Submodule libs/SimCore updated: 086f5d109e...e83e29190d
Submodule libs/json updated: b2306145e1...546370c9e7
@@ -25,7 +25,8 @@ namespace Entities
|
|||||||
SimCore::EntityKind EntityKind,
|
SimCore::EntityKind EntityKind,
|
||||||
std::uint32_t GroundTruthPort,
|
std::uint32_t GroundTruthPort,
|
||||||
std::uint32_t CommandPort,
|
std::uint32_t CommandPort,
|
||||||
std::string CommandIPAddress):EntityName_(EnttityName),
|
std::string CommandIPAddress):
|
||||||
|
EntityName_(EnttityName),
|
||||||
ownTrack_(OwnType, OwnID, SimCore::TrackKind::GROUND_TRUTH_TRACK),
|
ownTrack_(OwnType, OwnID, SimCore::TrackKind::GROUND_TRUTH_TRACK),
|
||||||
ParentID_(ParentID),
|
ParentID_(ParentID),
|
||||||
EntityKind_(EntityKind),
|
EntityKind_(EntityKind),
|
||||||
@@ -37,6 +38,12 @@ namespace Entities
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Entity::~Entity()
|
||||||
|
{
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
void Entity::start()
|
void Entity::start()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -81,8 +88,6 @@ namespace Entities
|
|||||||
LOG_S(ERROR)<< threads.size();
|
LOG_S(ERROR)<< threads.size();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entity::physicsWorker()
|
void Entity::physicsWorker()
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
#include "SimCore/Identifier.hpp"
|
#include "SimCore/Identifier.hpp"
|
||||||
|
#include "SimCore/Orientation.hpp"
|
||||||
|
#include "SimCore/Position.hpp"
|
||||||
#include "WHISPER/Messages/Message.hpp"
|
#include "WHISPER/Messages/Message.hpp"
|
||||||
#include <SimCore/SimCore.hpp>
|
#include <SimCore/SimCore.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -23,13 +25,16 @@ class Ship : public Entities::Entity
|
|||||||
std::string CommandIPAddress):
|
std::string CommandIPAddress):
|
||||||
Entity( OwnID,EntityName,ownType, ParentID, EntityKind, GroundTruthPort, CommandPort, CommandIPAddress)
|
Entity( OwnID,EntityName,ownType, ParentID, EntityKind, GroundTruthPort, CommandPort, CommandIPAddress)
|
||||||
{
|
{
|
||||||
|
this->ownShipPosition_ = std::make_shared<SimCore::Position>();
|
||||||
|
this->ownShipOrientation_ = std::make_shared<SimCore::Orientation>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) override
|
void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) override
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
LOG_S(INFO)<<"calculating every " << duration << "milliseconds";
|
LOG_S(INFO)<<"calculating every " << duration << "milliseconds";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user