diff --git a/components/codecs/include/ftl/codecs/channels.hpp b/components/codecs/include/ftl/codecs/channels.hpp index 17197c31b126e5e8bf373b139c8efd7e56e5d9b6..71c97dc9f8c5fb530c2387a62a5d0819a9c599cc 100644 --- a/components/codecs/include/ftl/codecs/channels.hpp +++ b/components/codecs/include/ftl/codecs/channels.hpp @@ -2,7 +2,7 @@ #define _FTL_RGBD_CHANNELS_HPP_ #include <bitset> -#include <ftl/utility/msgpack.hpp> +#include <msgpack.hpp> namespace ftl { namespace codecs { diff --git a/components/codecs/include/ftl/codecs/codecs.hpp b/components/codecs/include/ftl/codecs/codecs.hpp index ad49ef6e013c1e807b26d2aed9bf423e991d5da7..68d4591e63421fed546d2574ccbd7cd15f389157 100644 --- a/components/codecs/include/ftl/codecs/codecs.hpp +++ b/components/codecs/include/ftl/codecs/codecs.hpp @@ -2,7 +2,7 @@ #define _FTL_CODECS_BITRATES_HPP_ #include <cstdint> -#include <ftl/utility/msgpack.hpp> +#include <msgpack.hpp> namespace ftl { namespace codecs { diff --git a/components/codecs/include/ftl/codecs/packet.hpp b/components/codecs/include/ftl/codecs/packet.hpp index f19ffcba2f7ace52778a509b2c3e55b0cebf6d7b..02d0af71f4d46ebf7a2a6a196b46d3ffdf51d98a 100644 --- a/components/codecs/include/ftl/codecs/packet.hpp +++ b/components/codecs/include/ftl/codecs/packet.hpp @@ -5,7 +5,7 @@ #include <vector> #include <ftl/codecs/codecs.hpp> #include <ftl/codecs/channels.hpp> -#include <ftl/utility/msgpack.hpp> +#include <msgpack.hpp> namespace ftl { namespace codecs { diff --git a/components/common/cpp/CMakeLists.txt b/components/common/cpp/CMakeLists.txt index f129316c3bbb20e7627aaa4b8bb2c4d105c2fb3c..71715801d4e30b57f440d49b65de6445024a46de 100644 --- a/components/common/cpp/CMakeLists.txt +++ b/components/common/cpp/CMakeLists.txt @@ -30,8 +30,6 @@ target_include_directories(ftlcommon PUBLIC target_link_libraries(ftlcommon Threads::Threads Eigen3::Eigen ${OS_LIBS} ${OpenCV_LIBS} ${URIPARSER_LIBRARIES} ${CUDA_LIBRARIES}) target_precompile_headers(ftlcommon - PRIVATE include/ftl/utility/msgpack.hpp - PRIVATE include/ftl/utility/msgpack_optional.hpp PRIVATE include/ftl/cuda_common.hpp PRIVATE include/loguru.hpp ) diff --git a/components/operators/src/poser.cpp b/components/operators/src/poser.cpp index 32948ac4a29a1100a7479685d8d0f810279d3873..2f8a166cff6c67979acf42d7ab375bad928b9b44 100644 --- a/components/operators/src/poser.cpp +++ b/components/operators/src/poser.cpp @@ -113,7 +113,7 @@ bool Poser::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cudaStream_ auto p = pose_db__.find(pose_ident); if (p != pose_db__.end()) { (*p).second.locked = config()->value("locked",false); - in.pose = (config()->value("inverse",false)) ? (*p).second.pose.inverse() : (*p).second.pose; + in.cast<ftl::rgbd::Frame>().setPose() = (config()->value("inverse",false)) ? (*p).second.pose.inverse() : (*p).second.pose; } else { LOG(WARNING) << "Pose not found: " << pose_ident; } diff --git a/components/renderers/cpp/src/CUDARender.cpp b/components/renderers/cpp/src/CUDARender.cpp index c72d3dacea9684adb9abd26f458665b6c0079dbe..b3d07ac298125d39f206469b5c7472d3bbb54ce2 100644 --- a/components/renderers/cpp/src/CUDARender.cpp +++ b/components/renderers/cpp/src/CUDARender.cpp @@ -647,7 +647,7 @@ bool CUDARender::submit(ftl::data::FrameSet *in, Channels<0> chans, const Eigen: bool success = true; try { - _renderPass1(in->pose); + _renderPass1(t); //cudaSafeCall(cudaStreamSynchronize(stream_)); } catch (const ftl::exception &e) { LOG(ERROR) << "Exception in render: " << e.what(); @@ -657,7 +657,7 @@ bool CUDARender::submit(ftl::data::FrameSet *in, Channels<0> chans, const Eigen: auto &s = sets_.emplace_back(); s.fs = in; s.channels = chans; - s.transform = in->pose; + s.transform = t; last_frame_ = scene_->timestamp(); scene_ = nullptr; diff --git a/components/streams/src/builder.cpp b/components/streams/src/builder.cpp index f4fc8b6a41c1e67fa47f12d22557b5727091fa5b..486823cadbaa3192663d758acc96771dd43ebcdb 100644 --- a/components/streams/src/builder.cpp +++ b/components/streams/src/builder.cpp @@ -104,7 +104,6 @@ std::shared_ptr<ftl::data::FrameSet> LocalBuilder::_allocate(int64_t timestamp) newf->count = size_; newf->mask = 0xFF; newf->clearFlags(); - newf->pose.setIdentity(); return newf; } @@ -423,7 +422,6 @@ std::shared_ptr<ftl::data::FrameSet> ForeignBuilder::_addFrameset(int64_t timest newf->count = 0; newf->mask = 0; newf->clearFlags(); - newf->pose.setIdentity(); // Deprecated? // Insertion sort by timestamp for (auto i=framesets_.begin(); i!=framesets_.end(); i++) { diff --git a/components/streams/src/renderers/screen_render.cpp b/components/streams/src/renderers/screen_render.cpp index c60bd704761e9d6f40ba725360e99844f03d4ad4..d06d57f7f243ac0acdbe0bb11786997b6b6ec932 100644 --- a/components/streams/src/renderers/screen_render.cpp +++ b/components/streams/src/renderers/screen_render.cpp @@ -133,10 +133,14 @@ bool ScreenRender::retrieve(ftl::data::Frame &frame_out) { for (auto &s : sets) { if (s->frameset() == my_id_) continue; // Skip self + Eigen::Matrix4d pose; + pose.setIdentity(); + if (s->hasChannel(Channel::Pose)) pose = s->cast<ftl::rgbd::Frame>().getPose(); + if (!data_only) renderer_->submit( s.get(), ftl::codecs::Channels<0>(ftl::codecs::Channel::Colour), - s->pose); + pose); } if (!data_only) renderer_->render(); diff --git a/components/structures/CMakeLists.txt b/components/structures/CMakeLists.txt index 95cd7ba297b8d39cb6e38207fcd752c16fd4b8b0..c291ee7e2c33f187388173a50bb91e2ff8abce76 100644 --- a/components/structures/CMakeLists.txt +++ b/components/structures/CMakeLists.txt @@ -7,8 +7,6 @@ target_include_directories(ftldata PUBLIC target_link_libraries(ftldata ftlcommon Eigen3::Eigen ftlcodecs) target_precompile_headers(ftldata - PRIVATE ../common/cpp/include/ftl/utility/msgpack.hpp - PRIVATE ../common/cpp/include/ftl/utility/msgpack_optional.hpp PRIVATE ../common/cpp/include/ftl/cuda_common.hpp PRIVATE ../common/cpp/include/loguru.hpp PRIVATE include/ftl/data/new_frame.hpp diff --git a/components/structures/include/ftl/data/messages.hpp b/components/structures/include/ftl/data/messages.hpp index f4e9ba27e964c8ae676c5724212302f7a50f63bf..9f90263fd8f3136fedbc91e50e65ec3d55864656 100644 --- a/components/structures/include/ftl/data/messages.hpp +++ b/components/structures/include/ftl/data/messages.hpp @@ -1,7 +1,7 @@ #ifndef _FTL_DATA_MESSAGES_HPP_ #define _FTL_DATA_MESSAGES_HPP_ -#include <ftl/utility/msgpack.hpp> +#include <msgpack.hpp> namespace ftl { namespace data { diff --git a/components/structures/include/ftl/data/new_frameset.hpp b/components/structures/include/ftl/data/new_frameset.hpp index 368456f2057fd9a94853677a8dbc6340e7162eb3..096a02c2f616f404b97d7cbabc82796d5b14141c 100644 --- a/components/structures/include/ftl/data/new_frameset.hpp +++ b/components/structures/include/ftl/data/new_frameset.hpp @@ -45,7 +45,7 @@ class FrameSet : public ftl::data::Frame { std::atomic<int> flush_count; // How many channels have been flushed SHARED_MUTEX smtx; - Eigen::Matrix4d pose; // Set to identity by default. + //Eigen::Matrix4d pose; // Set to identity by default. inline int64_t localTimestamp() const { return timestamp() + originClockDelta; } diff --git a/components/structures/src/frameset.cpp b/components/structures/src/frameset.cpp index d804c68d0b96bc84857d6cf9e5e3dba7a22b0e38..4d4cbc88b03f5a149ba9d012af1f75182316ca69 100644 --- a/components/structures/src/frameset.cpp +++ b/components/structures/src/frameset.cpp @@ -50,7 +50,6 @@ void ftl::data::FrameSet::moveTo(ftl::data::FrameSet &fs) { fs.count = static_cast<int>(count); fs.flags_ = (int)flags_; fs.mask = static_cast<unsigned int>(mask); - fs.pose = pose; fs.frames = std::move(frames); count = 0;