Skip to content

Commit

Permalink
Revert "working on things"
Browse files Browse the repository at this point in the history
This reverts commit d625d9f.
  • Loading branch information
JuanCarlosgg committed Nov 15, 2024
1 parent d625d9f commit 6cad185
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 26 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,3 @@ add_subdirectory(gui)
add_subdirectory(python-wrapper)


if (WITH_TESTS)

#add_subdirectory(tests)

endif()
4 changes: 2 additions & 2 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON)

find_package(Qt6 COMPONENTS Core REQUIRED)
find_package(Eigen3 3.3 REQUIRED)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(cppitertools)

if(DEFINED GEOMETRY_API)
Expand Down Expand Up @@ -85,7 +85,7 @@ set_target_properties(dsr_api PROPERTIES
# set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
# set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")

target_compile_options(dsr_api PUBLIC -g -O3 -fmax-errors=5 -std=c++20 -fno-char8_t)
target_compile_options(dsr_api PUBLIC -O1 -O3 -fmax-errors=5 -std=c++20 -fno-char8_t)


# 'make install' to the correct locations (provided by GNUInstallDirs).
Expand Down
6 changes: 3 additions & 3 deletions api/dsr_rt_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void RT_API::insert_or_assign_edge_RT(Node &n, uint64_t to, const std::vector<fl
}

//Check if RT edge exist.
if (!n.fano().contains({to, "RT"}))
if (n.fano().find({to, "RT"}) == n.fano().end())
{
//Create -> from: IDL::MvregEdge, to: vector<IDL::MvregNodeAttr>
std::tie(r1, node1_insert, std::ignore) = G->insert_or_assign_edge_(std::move(e), n.id(), to);
Expand Down Expand Up @@ -373,7 +373,7 @@ void RT_API::insert_or_assign_edge_RT(Node &n, uint64_t to, std::vector<float> &
to_n = G->get_(to).value();
if (auto x = G->get_crdt_attrib_by_name<parent_att>(to_n.value()); x.has_value())
{
if (x.value() != n.id())
if ( x.value() != n.id())
{
no_send = !G->modify_attrib_local<parent_att>(to_n.value(), n.id());
}
Expand All @@ -396,7 +396,7 @@ void RT_API::insert_or_assign_edge_RT(Node &n, uint64_t to, std::vector<float> &
}

//Check if RT edge exist.
if (!n.fano().contains({to, "RT"}))
if (n.fano().find({to, "RT"}) == n.fano().end())
{
//Create -> from: IDL::MvregEdge, to: vector<IDL::MvregNodeAttr>
std::tie(r1, node1_insert, std::ignore) = G->insert_or_assign_edge_(std::move(e), n.id(), to);
Expand Down
3 changes: 1 addition & 2 deletions api/include/dsr/api/dsr_agent_info_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
#ifndef DSR_AGENTINFO_API_H
#define DSR_AGENTINFO_API_H

#include <thread>
#include <QDebug>
#include <dsr/core/types/type_checking/dsr_node_type.h>
#include <dsr/core/types/type_checking/dsr_attr_name.h>
#include <dsr/api/dsr_api.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <QDebug>

namespace DSR {

Expand Down
6 changes: 3 additions & 3 deletions api/include/dsr/api/dsr_eigen_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by pbustos on 1/10/20.
//

#ifndef DSR_EIGEN_DEFS_H
#define DSR_EIGEN_DEFS_H
#ifndef CACA_DSR_EIGEN_DEFS_H
#define CACA_DSR_EIGEN_DEFS_H

#include <Eigen/Dense>

Expand All @@ -20,4 +20,4 @@ namespace Mat
using Mat44d = Eigen::Matrix<float, 4, 4>;
};

#endif //DSR_EIGEN_DEFS_H
#endif //CACA_DSR_EIGEN_DEFS_H
3 changes: 1 addition & 2 deletions api/include/dsr/api/dsr_rt_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ namespace DSR

void insert_or_assign_edge_RT(Node &n, uint64_t to, const std::vector<float> &trans, const std::vector<float> &rot_euler);
void insert_or_assign_edge_RT(Node &n, uint64_t to, std::vector<float> &&trans, std::vector<float> &&rot_euler);

static std::optional<Edge> get_edge_RT(const Node &n, uint64_t to);
std::optional<Edge> get_edge_RT(const Node &n, uint64_t to);
std::optional<Mat::RTMat> get_RT_pose_from_parent(const Node &n);
std::optional<Mat::RTMat> get_edge_RT_as_rtmat(const Edge &edge, std::uint64_t timestamp = 0);
std::optional<Eigen::Vector3d> get_translation(const Node &n, uint64_t to, std::uint64_t timestamp = 0);
Expand Down
10 changes: 2 additions & 8 deletions python-wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@ project(python_wrapper

find_package(Qt6 COMPONENTS Core REQUIRED)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
#find_package(PythonLibs REQUIRED)
#find_package(Python3)


set(Python3_SITEARCH "/usr/local/lib/python3.10/dist-packages")
set(PYTHON_LIBRARIES "/usr/lib/x86_64-linux-gnu/libpython3.10.so")
set(PYTHON_INCLUDE_DIRS "/usr/include/python3.10")

find_package(PythonLibs REQUIRED)
find_package(Python3)
find_package(pybind11 CONFIG REQUIRED)

add_library(pydsr MODULE)
Expand Down
2 changes: 1 addition & 1 deletion python-wrapper/python_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ PYBIND11_MODULE(pydsr, m) {
) {
self.insert_or_assign_edge_RT(n, to, translation, rotation_euler);
}, "node"_a, "to"_a, "trans"_a, "rot_euler"_a)
.def_static("get_edge_RT", &RT_API::get_edge_RT, "node"_a, "to"_a)
.def("get_edge_RT", &RT_API::get_edge_RT, "node"_a, "to"_a)
.def("get_RT_pose_from_parent", [](RT_API &self, Node &e) -> std::optional<Eigen::Matrix<double, 4, 4>> {
auto tmp = self.get_RT_pose_from_parent(e);
if (tmp.has_value()) {
Expand Down

0 comments on commit 6cad185

Please sign in to comment.