Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Volume Config #62

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions yak/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD_REQUIRED True)
endif()

find_package(cmake_common_scripts REQUIRED)
find_package(ros_industrial_cmake_boilerplate REQUIRED)
find_package(CUDA 9.0 REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core highgui)
find_package(PCL 1.8 REQUIRED COMPONENTS common io geometry surface)
Expand Down Expand Up @@ -150,7 +150,7 @@ target_link_libraries(marching_cubes_tests
install(DIRECTORY include/${PROJECT_NAME}
DESTINATION include)

# cmake_common_scripts package configure
# ros_industrial_cmake_boilerplate package configure
configure_package(NAMESPACE yak TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_frontend ${PROJECT_NAME}_marching_cubes)

# uninstall target
Expand Down
2 changes: 1 addition & 1 deletion yak/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<maintainer email="[email protected]">Joseph Schornak</maintainer>
<license>MIT</license>

<build_depend>cmake_common_scripts</build_depend>
<build_depend>ros_industrial_cmake_boilerplate</build_depend>

<depend>libpcl-all-dev</depend>
<depend>eigen</depend>
Expand Down
7 changes: 4 additions & 3 deletions yak/src/kfusion/kinfu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ kfusion::KinFu::KinFu(const KinFuParams& params) : frame_counter_(0), params_(pa
params_.volume_dims[1] * params_.volume_resolution,
params_.volume_dims[2] * params_.volume_resolution);
volume_->setSize(volumeSize);
// volume_->setPose(params_.volume_pose);
//This is not enough to translate the actual volume; still @ world 0
//volume_->setPose(params_.volume_pose);

volume_->setRaycastStepFactor(params_.raycast_step_factor);
volume_->setGradientDeltaFactor(params_.gradient_delta_factor);
Expand All @@ -76,7 +77,7 @@ kfusion::KinFu::KinFu(const KinFuParams& params) : frame_counter_(0), params_(pa
poses_.reserve(30000);

// TODO: Allow loading of robot pose instead of default volume pose
poses_.push_back(params_.volume_pose.matrix);
poses_.push_back(params_.volume_pose);
}

const kfusion::KinFuParams& kfusion::KinFu::params() const { return params_; }
Expand Down Expand Up @@ -139,7 +140,7 @@ void kfusion::KinFu::resetPose()
poses_.reserve(30000);

// TODO: Allow loading of robot pose instead of default volume pose
poses_.push_back(params_.volume_pose.matrix);
poses_.push_back(params_.volume_pose);
cout << "Resetting to: " << params_.volume_pose.matrix << endl;

// volume_->clear();
Expand Down
2 changes: 2 additions & 0 deletions yak/src/yak_server.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <yak/yak_server.h>
#include <opencv2/core/eigen.hpp>
#include <opencv2/highgui/highgui.hpp> // named-window apparatus; TODO: Remove this

yak::FusionServer::FusionServer(const kfusion::KinFuParams& params, const Eigen::Affine3f& world_to_volume)
Expand Down Expand Up @@ -47,6 +48,7 @@ bool yak::FusionServer::reset()
bool yak::FusionServer::resetWithNewParams(const kfusion::KinFuParams& params)
{
kinfu_.reset(new kfusion::KinFu(params));
cv::cv2eigen(params.volume_pose.inv().matrix, volume_to_world_.matrix());
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion yak_ext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5.0)
project(yak_ext VERSION 0.1.0)

find_package(cmake_common_scripts REQUIRED)
find_package(ros_industrial_cmake_boilerplate REQUIRED)

if(BUILD_TESTING)
find_package(GTest QUIET)
Expand Down
2 changes: 1 addition & 1 deletion yak_ext/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<maintainer email="[email protected]">Joseph Schornak</maintainer>
<author email="[email protected]">Joseph Schornak</author>
<license>Apache 2.0</license>
<build_depend>cmake_common_scripts</build_depend>
<build_depend>ros_industrial_cmake_boilerplate</build_depend>
<export>
<build_type>cmake</build_type>
</export>
Expand Down