Skip to content

Commit 3549feb

Browse files
Switch to Cereal for serialization (#281)
1 parent a8a6d2f commit 3549feb

24 files changed

+55
-88
lines changed

dependencies.rosinstall

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@
3434
local-name: ifopt
3535
uri: https://github.com/ethz-adrl/ifopt.git
3636
version: 2.1.4
37+
- git:
38+
local-name: cereal
39+
uri: https://github.com/Levi-Armstrong/cereal.git
40+
version: catkin

dependencies_unstable.rosinstall

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@
3434
local-name: ifopt
3535
uri: https://github.com/ethz-adrl/ifopt.git
3636
version: master
37+
- git:
38+
local-name: cereal
39+
uri: https://github.com/Levi-Armstrong/cereal.git
40+
version: catkin

dependencies_with_ext.rosinstall

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@
3838
local-name: ifopt
3939
uri: https://github.com/ethz-adrl/ifopt.git
4040
version: 2.1.4
41+
- git:
42+
local-name: cereal
43+
uri: https://github.com/Levi-Armstrong/cereal.git
44+
version: catkin

tesseract_monitoring/src/contact_monitor_node.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
3232
#include <boost/algorithm/string.hpp>
3333
TESSERACT_COMMON_IGNORE_WARNINGS_POP
3434

35+
#include <tesseract_common/resource_locator.h>
3536
#include <tesseract_environment/environment.h>
3637
#include <tesseract_scene_graph/graph.h>
3738
#include <tesseract_srdf/srdf_model.h>
@@ -88,7 +89,7 @@ int main(int argc, char** argv)
8889
nh.getParam(robot_description + "_semantic", srdf_xml_string);
8990

9091
auto env = std::make_unique<tesseract_environment::Environment>();
91-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
92+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
9293
if (!env->init(urdf_xml_string, srdf_xml_string, locator))
9394
{
9495
ROS_ERROR("Failed to initialize environment.");

tesseract_monitoring/src/environment_monitor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
5353
#include <tesseract_msgs/GetEnvironmentInformation.h>
5454
#include <tesseract_msgs/SaveSceneGraph.h>
5555

56+
#include <tesseract_common/resource_locator.h>
5657
#include <tesseract_scene_graph/scene_state.h>
5758
#include <tesseract_scene_graph/graph.h>
5859
#include <tesseract_environment/environment.h>
@@ -150,7 +151,7 @@ struct ROSEnvironmentMonitor::Implementation
150151
root_nh.getParam(robot_description + "_semantic", srdf_xml_string);
151152

152153
parent->env_ = std::make_shared<tesseract_environment::Environment>();
153-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
154+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
154155
if (!parent->env_->init(urdf_xml_string, srdf_xml_string, locator))
155156
return;
156157

tesseract_planning_server/src/tesseract_planning_server.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
7272
#include <tesseract_msgs/GetMotionPlanAction.h>
7373

7474
#include <tesseract_common/profile_dictionary.h>
75-
#include <tesseract_common/serialization.h>
7675
#include <tesseract_common/any_poly.h>
7776
#include <tesseract_common/stopwatch.h>
7877
#include <tesseract_environment/environment.h>
@@ -82,6 +81,10 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
8281
#include <tesseract_command_language/composite_instruction.h>
8382
#include <tesseract_command_language/constants.h>
8483

84+
#include <tesseract_common/cereal_serialization.h>
85+
#include <tesseract_command_language/cereal_serialization.h>
86+
#include <tesseract_common/serialization.h>
87+
8588
using tesseract_common::Serialization;
8689
using tesseract_planning::InstructionPoly;
8790
using tesseract_planning::TaskComposerDataStorage;

tesseract_qt_ros/src/widgets/environment_monitor_widget.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <tesseract_qt/common/environment_wrapper.h>
3333
#include <tesseract_qt/common/utils.h>
3434

35+
#include <tesseract_common/resource_locator.h>
3536
#include <tesseract_environment/environment.h>
3637
#include <tesseract_environment/command.h>
3738

@@ -200,7 +201,7 @@ void EnvironmentMonitorWidget::onURDFDescriptionChanged()
200201
data_->nh->getParam(ui->urdf_param_line_edit->text().toStdString() + "_semantic", srdf_xml_string);
201202

202203
auto env = std::make_shared<tesseract_environment::Environment>();
203-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
204+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
204205
if (env->init(urdf_xml_string, srdf_xml_string, locator))
205206
{
206207
if (data_->monitor != nullptr)
@@ -269,7 +270,7 @@ void EnvironmentMonitorWidget::snapshotCallback(const tesseract_msgs::Environmen
269270
tesseract_rosutils::fromMsg(jv, msg->joint_states);
270271
tesseract_rosutils::fromMsg(fjv, msg->floating_joint_states);
271272
auto env = std::make_shared<tesseract_environment::Environment>();
272-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
273+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
273274
env->setResourceLocator(locator);
274275
if (env->init(commands))
275276
{

tesseract_ros_examples/src/basic_cartesian_example_node.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
3030
TESSERACT_COMMON_IGNORE_WARNINGS_POP
3131

3232
#include <tesseract_examples/basic_cartesian_example.h>
33+
#include <tesseract_common/resource_locator.h>
3334
#include <tesseract_scene_graph/graph.h>
3435
#include <tesseract_environment/environment.h>
3536
#include <tesseract_monitoring/environment_monitor.h>
@@ -76,7 +77,7 @@ int main(int argc, char** argv)
7677
}
7778

7879
auto env = std::make_shared<tesseract_environment::Environment>();
79-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
80+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
8081
if (!env->init(urdf_xml_string, srdf_xml_string, locator))
8182
exit(1);
8283

tesseract_ros_examples/src/car_seat_example_node.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
3030
TESSERACT_COMMON_IGNORE_WARNINGS_POP
3131

3232
#include <tesseract_examples/car_seat_example.h>
33+
#include <tesseract_common/resource_locator.h>
3334
#include <tesseract_scene_graph/graph.h>
3435
#include <tesseract_environment/environment.h>
3536
#include <tesseract_monitoring/environment_monitor.h>
@@ -71,7 +72,7 @@ int main(int argc, char** argv)
7172
nh.getParam(ROBOT_SEMANTIC_PARAM, srdf_xml_string);
7273

7374
auto env = std::make_shared<tesseract_environment::Environment>();
74-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
75+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
7576
if (!env->init(urdf_xml_string, srdf_xml_string, locator))
7677
exit(1);
7778

tesseract_ros_examples/src/freespace_hybrid_example_node.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
3030
TESSERACT_COMMON_IGNORE_WARNINGS_POP
3131

3232
#include <tesseract_examples/freespace_hybrid_example.h>
33+
#include <tesseract_common/resource_locator.h>
3334
#include <tesseract_scene_graph/graph.h>
3435
#include <tesseract_environment/environment.h>
3536
#include <tesseract_monitoring/environment_monitor.h>
@@ -71,7 +72,7 @@ int main(int argc, char** argv)
7172
nh.getParam(ROBOT_SEMANTIC_PARAM, srdf_xml_string);
7273

7374
auto env = std::make_shared<tesseract_environment::Environment>();
74-
auto locator = std::make_shared<tesseract_rosutils::ROSResourceLocator>();
75+
auto locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
7576
if (!env->init(urdf_xml_string, srdf_xml_string, locator))
7677
exit(1);
7778

0 commit comments

Comments
 (0)