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

Add dependency on message_serialization #27

Merged
Merged
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
6 changes: 6 additions & 0 deletions dependencies.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@
local-name: cmake_common_scripts
uri: 'https://github.com/ros-industrial/cmake_common_scripts.git'
version: 15450c289e1a92c51e9b6d953f4d07d7e7ccaa18

# Message serialization
- git:
local-name: message_serialization
uri: 'https://github.com/swri-robotics/message_serialization.git'
version: 0.1.0
4 changes: 2 additions & 2 deletions opp_area_selection/src/selection_artist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <eigen_conversions/eigen_msg.h>
#include <geometry_msgs/PointStamped.h>
#include <opp_msgs_serialization/serialize.h>
#include <message_serialization/serialize.h>
#include <ros/package.h>
#include <shape_msgs/Mesh.h>
#include <tf/tf.h>
Expand Down Expand Up @@ -291,7 +291,7 @@ bool SelectionArtist::collectROIPointsCb(opp_msgs::GetROISelectionRequest& req,
pcl::fromROSMsg(req.input_cloud, *cloud);

AreaSelectorParameters params;
bool success = opp_msgs_serialization::deserialize(area_selection_config_file, params);
bool success = message_serialization::deserialize(area_selection_config_file, params);
if (!success)
{
ROS_ERROR_STREAM("Could not load area selection config from: " << area_selection_config_file);
Expand Down
7 changes: 2 additions & 5 deletions opp_database/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ find_package(catkin REQUIRED COMPONENTS
find_package(Qt5 REQUIRED COMPONENTS Sql)
find_package(Boost REQUIRED)

# Prevents certain runtime errors in Ubuntu 18.04
add_definitions(${PCL_DEFINITIONS})

catkin_package(
INCLUDE_DIRS
include
Expand All @@ -27,8 +24,9 @@ catkin_package(
opp_msgs
opp_msgs_serialization
DEPENDS
Qt5
Boost
CFG_EXTRAS
${PROJECT_NAME}-extras.cmake
)

include_directories(
Expand All @@ -46,7 +44,6 @@ target_link_libraries(${PROJECT_NAME}_cpp
Qt5::Sql
)


#############
## Install ##
#############
Expand Down
1 change: 1 addition & 0 deletions opp_database/cmake/opp_database-extras.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find_package(Qt5 REQUIRED COMPONENTS Sql)
20 changes: 10 additions & 10 deletions opp_database/src/opp_database_interface_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <ros/console.h>

#include <opp_msgs_serialization/serialize.h>
#include <message_serialization/serialize.h>
#include <opp_msgs_serialization/opp_msgs_yaml.h>

namespace opp_db
Expand Down Expand Up @@ -66,7 +66,7 @@ long int ROSDatabaseInterface::addJobToDatabase(const opp_msgs::Job& job, std::s

std::string filepath =
save_dir_ + "/job_" + job.name + "_" + boost::posix_time::to_iso_string(ros::Time::now().toBoost()) + ".yaml";
bool success = opp_msgs_serialization::serialize(filepath, job.paths);
bool success = message_serialization::serialize(filepath, job.paths);
if (!success)
{
message = "Failed to save tool paths to file at '" + filepath + "'";
Expand All @@ -92,7 +92,7 @@ long int ROSDatabaseInterface::addPartToDatabase(const opp_msgs::Part& part, std

// touchoff_points
std::string filepath = save_dir_ + "/touch_pts_" + part.name + "_" + time + ".yaml";
bool success = opp_msgs_serialization::serialize(filepath, part.touch_points);
bool success = message_serialization::serialize(filepath, part.touch_points);
if (!success)
{
message = "Failed to save touchoff points to file '" + filepath + "'";
Expand All @@ -103,7 +103,7 @@ long int ROSDatabaseInterface::addPartToDatabase(const opp_msgs::Part& part, std

// verification_points
filepath = save_dir_ + "/verification_points_" + part.name + "_" + time + ".yaml";
success = opp_msgs_serialization::serialize(filepath, part.verification_points);
success = message_serialization::serialize(filepath, part.verification_points);
if (!success)
{
message = "Failed to save verification points to file '" + filepath + "'";
Expand Down Expand Up @@ -147,7 +147,7 @@ bool ROSDatabaseInterface::getJobFromDatabase(const unsigned int job_id, std::st
job.part_id = result.value("part_id").toUInt();

const std::string file_path = result.value("paths").toString().toStdString();
bool success = opp_msgs_serialization::deserialize(file_path, job.paths);
bool success = message_serialization::deserialize(file_path, job.paths);
if (!success)
{
message = "Failed to load tool paths file from '" + file_path + "'";
Expand Down Expand Up @@ -191,7 +191,7 @@ bool ROSDatabaseInterface::getAllJobsFromDatabase(const unsigned int part_id,
j.part_id = result.value("part_id").toUInt();

const std::string filepath = result.value("paths").toString().toStdString();
bool success = opp_msgs_serialization::deserialize(filepath, j.paths);
bool success = message_serialization::deserialize(filepath, j.paths);
if (!success)
{
message = "Failed to load tool path file from '" + filepath + "'";
Expand Down Expand Up @@ -237,15 +237,15 @@ bool ROSDatabaseInterface::getPartFromDatabase(const unsigned int part_id, std::
part.mesh_resource = result.value("mesh_resource").toString().toStdString();

const std::string touchoff_pts_filename = result.value("touchoff_points").toString().toStdString();
bool success = opp_msgs_serialization::deserialize(touchoff_pts_filename, part.touch_points);
bool success = message_serialization::deserialize(touchoff_pts_filename, part.touch_points);
if (!success)
{
message = "Failed to load touchoff points from '" + touchoff_pts_filename + "'";
return false;
}

const std::string verification_pts_filename = result.value("verification_points").toString().toStdString();
success = opp_msgs_serialization::deserialize(verification_pts_filename, part.verification_points);
success = message_serialization::deserialize(verification_pts_filename, part.verification_points);
if (!success)
{
message = "Failed to load verification points from '" + verification_pts_filename + "'";
Expand Down Expand Up @@ -285,15 +285,15 @@ bool ROSDatabaseInterface::getAllPartsFromDatabase(std::string& message, std::ma
p.mesh_resource = result.value("mesh_resource").toString().toStdString();

const std::string touch_pts_filename = result.value("touchoff_points").toString().toStdString();
bool success = opp_msgs_serialization::deserialize(touch_pts_filename, p.touch_points);
bool success = message_serialization::deserialize(touch_pts_filename, p.touch_points);
if (!success)
{
message = "Failed to load touchoff points from '" + touch_pts_filename + "'";
return false;
}

const std::string verification_pts_filename = result.value("verification_points").toString().toStdString();
success = opp_msgs_serialization::deserialize(verification_pts_filename, p.verification_points);
success = message_serialization::deserialize(verification_pts_filename, p.verification_points);
if (!success)
{
message = "Failed to load verification points from '" + verification_pts_filename + "'";
Expand Down
17 changes: 6 additions & 11 deletions opp_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ find_package(catkin REQUIRED COMPONENTS
opp_area_selection
opp_msgs
opp_database
pcl_ros
rviz
shape_msgs
std_srvs
Expand All @@ -27,9 +28,6 @@ find_package(Qt5 REQUIRED COMPONENTS
Sql
)

find_package(PCL 1.9 REQUIRED)
add_definitions(${PCL_DEFINITIONS})

catkin_package(
INCLUDE_DIRS
include
Expand All @@ -49,13 +47,13 @@ catkin_package(
opp_area_selection
opp_msgs
opp_database
pcl_ros
rviz
shape_msgs
std_srvs
visualization_msgs
DEPENDS
Qt5
PCL
CFG_EXTRAS
${PROJECT_NAME}-extras.cmake
)

###########
Expand All @@ -66,7 +64,6 @@ include_directories(
include
${catkin_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${PCL_INCLUDE_DIRS}
)

set(opp_gui_UIS
Expand Down Expand Up @@ -129,7 +126,6 @@ target_link_libraries(${PROJECT_NAME}_utils
${catkin_LIBRARIES}
${PCL_LIBRARIES}
Qt5::Core
Qt5::Sql
)

# Qt Widgets
Expand All @@ -143,6 +139,7 @@ target_link_libraries(${PROJECT_NAME}_widgets
${PCL_LIBRARIES}
${PROJECT_NAME}_utils
Qt5::Widgets
Qt5::Sql
)

# Rviz Panel
Expand Down Expand Up @@ -194,7 +191,6 @@ target_link_libraries(touch_point_editor_demo_app
## Install ##
#############

# Mark executables and/or libraries for installation
install(
TARGETS
${PROJECT_NAME}_panels
Expand All @@ -209,15 +205,14 @@ install(
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)

# Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY ui/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/ui
)

install(
FILES
plugin_description.xml
Expand Down
1 change: 1 addition & 0 deletions opp_gui/cmake/opp_gui-extras.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Sql)
1 change: 1 addition & 0 deletions opp_gui/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<depend>opp_area_selection</depend>
<depend>opp_msgs</depend>
<depend>opp_database</depend>
<depend>pcl_ros</depend>
<depend>rviz</depend>
<depend>shape_msgs</depend>
<depend>std_srvs</depend>
Expand Down
12 changes: 2 additions & 10 deletions opp_msgs_serialization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ find_package(catkin REQUIRED COMPONENTS
geometry_msgs
sensor_msgs
std_msgs
roscpp_serialization
message_serialization
)

find_package(yaml-cpp REQUIRED)

# Prevents certain runtime errors in Ubuntu 18.04
add_definitions(${PCL_DEFINITIONS})

catkin_package(
INCLUDE_DIRS
include
Expand All @@ -31,8 +26,7 @@ catkin_package(
noether_msgs
roscpp
opp_msgs
DEPENDS
YAML_CPP
message_serialization
)

###########
Expand All @@ -42,7 +36,6 @@ catkin_package(
include_directories(
include
${catkin_INCLUDE_DIRS}
${YAML_CPP_INCLUDE_DIRS}
)

#############
Expand All @@ -64,6 +57,5 @@ if(CATKIN_ENABLE_TESTING)
)
target_link_libraries(${PROJECT_NAME}_test
${catkin_LIBRARIES}
yaml-cpp
)
endif()

This file was deleted.

Loading