diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 6134243c5..845e3266b 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -19,18 +19,19 @@ jobs:
fail-fast: false
matrix:
env:
+ # - IMAGE: rolling-source
+ # NAME: ccov
+ # TARGET_CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="--coverage"
- IMAGE: rolling-source
- NAME: ccov
- TARGET_CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="--coverage"
- IMAGE: rolling-source
CLANG_TIDY: pedantic
- - IMAGE: rolling-source
+ - IMAGE: jazzy-source
NAME: asan
# Add fast_unwind_on_malloc=0 to fix stacktraces being too short or do not make sense
# see https://github.com/google/sanitizers/wiki/AddressSanitizer
# Disable alloc/dealloc mismatch warnings: https://github.com/ros2/rclcpp/pull/1324
DOCKER_RUN_OPTS: >-
- -e PRELOAD=libasan.so.5
+ -e PRELOAD=libasan.so.8
-e LSAN_OPTIONS="suppressions=$PWD/.github/workflows/lsan.suppressions,fast_unwind_on_malloc=0"
-e ASAN_OPTIONS="new_delete_type_mismatch=0,alloc_dealloc_mismatch=0"
TARGET_CMAKE_ARGS: -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer -O1 -g"
@@ -38,7 +39,7 @@ jobs:
env:
CLANG_TIDY_ARGS: -quiet -export-fixes ${{ github.workspace }}/.work/clang-tidy-fixes.yaml
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
- UNDERLAY: /root/ws_moveit/install
+ UNDERLAY: ${{ endsWith(matrix.env.IMAGE, '-source') && '/root/ws_moveit/install' || ''}}
# TODO: Port to ROS2
# DOWNSTREAM_WORKSPACE: "github:ubi-agni/mtc_demos#master github:TAMS-Group/mtc_pour#master"
TARGET_CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Release
diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml
index e82d28df3..18c6c0a13 100644
--- a/.github/workflows/prerelease.yaml
+++ b/.github/workflows/prerelease.yaml
@@ -5,24 +5,24 @@ name: pre-release
on:
workflow_dispatch:
+ inputs:
+ ROS_DISTRO:
+ type: string
+ required: true
+ description: 'ROS distribution codename:'
+ default: noetic
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
default:
- strategy:
- matrix:
- distro: [noetic]
-
env:
- # https://github.com/ros-industrial/industrial_ci/issues/666
- BUILDER: catkin_make_isolated
- ROS_DISTRO: ${{ matrix.distro }}
+ ROS_DISTRO: ${{ inputs.ROS_DISTRO }}
PRERELEASE: true
BASEDIR: ${{ github.workspace }}/.work
- name: "${{ matrix.distro }}"
+ name: "${{ inputs.ROS_DISTRO }}"
runs-on: ubuntu-latest
steps:
- name: "Free up disk space"
diff --git a/.gitmodules b/.gitmodules
index 9339bbb20..d7508c721 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,3 +3,6 @@
url = https://github.com/pybind/pybind11
branch = smart_holder
shallow = true
+[submodule "core/src/scope_guard"]
+ path = core/src/scope_guard
+ url = https://github.com/ricab/scope_guard
diff --git a/README.md b/README.md
index 7063027ef..39cda41bd 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ This repository provides the following branches:
## Tutorial
-We provide a tutorial for a pick-and-place pipeline without bells & whistles [as part of the MoveIt tutorials](https://ros-planning.github.io/moveit_tutorials/doc/moveit_task_constructor/moveit_task_constructor_tutorial.html).
+We provide a tutorial for a pick-and-place pipeline without bells & whistles [as part of the MoveIt tutorials](https://moveit.github.io/moveit_tutorials/doc/moveit_task_constructor/moveit_task_constructor_tutorial.html).
## Roadmap
diff --git a/capabilities/CMakeLists.txt b/capabilities/CMakeLists.txt
index f07b78e46..e3d4d0c86 100644
--- a/capabilities/CMakeLists.txt
+++ b/capabilities/CMakeLists.txt
@@ -3,11 +3,14 @@ project(moveit_task_constructor_capabilities)
find_package(ament_cmake REQUIRED)
+find_package(fmt REQUIRED)
find_package(Boost REQUIRED)
find_package(moveit_common REQUIRED)
moveit_package()
find_package(moveit_core REQUIRED)
find_package(moveit_ros_move_group REQUIRED)
+find_package(moveit_ros_planning REQUIRED)
+find_package(moveit_task_constructor_core REQUIRED)
find_package(moveit_task_constructor_msgs REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rclcpp_action REQUIRED)
@@ -18,9 +21,12 @@ add_library(${PROJECT_NAME} SHARED
)
ament_target_dependencies(${PROJECT_NAME}
Boost
+ fmt
rclcpp_action
moveit_core
moveit_ros_move_group
+ moveit_ros_planning
+ moveit_task_constructor_core
moveit_task_constructor_msgs
)
@@ -31,6 +37,8 @@ install(TARGETS ${PROJECT_NAME}
pluginlib_export_plugin_description_file(moveit_ros_move_group capabilities_plugin_description.xml)
ament_export_dependencies(moveit_core)
ament_export_dependencies(moveit_ros_move_group)
+ament_export_dependencies(moveit_ros_planning)
+ament_export_dependencies(moveit_task_constructor_core)
ament_export_dependencies(moveit_task_constructor_msgs)
ament_export_dependencies(pluginlib)
ament_export_dependencies(rclcpp_action)
diff --git a/capabilities/package.xml b/capabilities/package.xml
index 4f61ceffc..518b37010 100644
--- a/capabilities/package.xml
+++ b/capabilities/package.xml
@@ -12,6 +12,7 @@
ament_cmake
+ fmt
moveit_core
moveit_ros_move_group
moveit_ros_planning
diff --git a/capabilities/src/execute_task_solution_capability.cpp b/capabilities/src/execute_task_solution_capability.cpp
index 27bdee5a4..badb430d7 100644
--- a/capabilities/src/execute_task_solution_capability.cpp
+++ b/capabilities/src/execute_task_solution_capability.cpp
@@ -43,9 +43,7 @@
#include
#include
#include
-#include
-
-#include
+#include
namespace {
@@ -164,8 +162,8 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr
if (!joint_names.empty()) {
group = findJointModelGroup(*model, joint_names);
if (!group) {
- RCLCPP_ERROR_STREAM(LOGGER, "Could not find JointModelGroup that actuates {"
- << boost::algorithm::join(joint_names, ", ") << "}");
+ RCLCPP_ERROR_STREAM(LOGGER, fmt::format("Could not find JointModelGroup that actuates {{{}}}",
+ fmt::join(joint_names, ", ")));
return false;
}
RCLCPP_DEBUG(LOGGER, "Using JointModelGroup '%s' for execution", group->getName().c_str());
@@ -184,11 +182,12 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr
exec_traj.controller_name = sub_traj.execution_info.controller_names;
/* TODO add action feedback and markers */
- exec_traj.effect_on_success = [this,
- &scene_diff = const_cast<::moveit_msgs::msg::PlanningScene&>(sub_traj.scene_diff),
+ exec_traj.effect_on_success = [this, &scene_diff = const_cast<::moveit_msgs::msg::PlanningScene&>(sub_traj.scene_diff),
description](const plan_execution::ExecutableMotionPlan* /*plan*/) {
+ // Never modify joint state directly (only via robot trajectories)
scene_diff.robot_state.joint_state = sensor_msgs::msg::JointState();
scene_diff.robot_state.multi_dof_joint_state = sensor_msgs::msg::MultiDOFJointState();
+ scene_diff.robot_state.is_diff = true; // silent empty JointState msg error
if (!moveit::core::isEmpty(scene_diff)) {
RCLCPP_DEBUG_STREAM(LOGGER, "apply effect of " << description);
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index d10d2f5ba..48cfd1b9d 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -4,6 +4,7 @@ project(moveit_task_constructor_core)
find_package(ament_cmake REQUIRED)
find_package(Boost REQUIRED)
+find_package(fmt REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(moveit_common REQUIRED)
moveit_package()
@@ -11,6 +12,7 @@ find_package(moveit_core REQUIRED)
find_package(moveit_ros_planning REQUIRED)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(moveit_task_constructor_msgs REQUIRED)
+find_package(py_binding_tools REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rviz_marker_tools REQUIRED)
find_package(tf2_eigen REQUIRED)
@@ -25,8 +27,8 @@ add_compile_options(-fvisibility-inlines-hidden)
set(PROJECT_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include/moveit/task_constructor)
add_subdirectory(src)
-# TODO: enable python wrapper
-#add_subdirectory(python)
+ament_python_install_package(moveit PACKAGE_DIR python/moveit)
+add_subdirectory(python)
add_subdirectory(test)
install(DIRECTORY include/ DESTINATION include
@@ -41,6 +43,7 @@ ament_export_dependencies(moveit_core)
ament_export_dependencies(moveit_ros_planning)
ament_export_dependencies(moveit_ros_planning_interface)
ament_export_dependencies(moveit_task_constructor_msgs)
+ament_export_dependencies(py_binding_tools)
ament_export_dependencies(rclcpp)
ament_export_dependencies(rviz_marker_tools)
ament_export_dependencies(tf2_eigen)
diff --git a/core/doc/tutorials/properties.rst b/core/doc/tutorials/properties.rst
index d9b260ec2..58dc19599 100644
--- a/core/doc/tutorials/properties.rst
+++ b/core/doc/tutorials/properties.rst
@@ -97,11 +97,6 @@ You can obtain a reference to the the PropertyMap of a stage like so
:start-after: [propertyTut10]
:end-before: [propertyTut10]
-.. literalinclude:: ../../../demo/scripts/properties.py
- :language: python
- :start-after: [propertyTut11]
- :end-before: [propertyTut11]
-
As mentioned, each stage contains a PropertyMap.
Stages communicate to each other via their interfaces.
diff --git a/core/include/moveit/python/python_tools/ros_types.h b/core/include/moveit/python/python_tools/ros_types.h
deleted file mode 100644
index e058ea8bf..000000000
--- a/core/include/moveit/python/python_tools/ros_types.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#pragma once
-
-#include
-#include
-#include
-
-/** Provide pybind11 type converters for ROS types */
-
-namespace moveit {
-namespace python {
-
-PYBIND11_EXPORT pybind11::object createMessage(const std::string& ros_msg_name);
-PYBIND11_EXPORT bool convertible(const pybind11::handle& h, const char* ros_msg_name);
-
-} // namespace python
-} // namespace moveit
-
-namespace pybind11 {
-namespace detail {
-
-/// Convert ros::Duration / ros::WallDuration into a float
-template
-struct DurationCaster
-{
- // C++ -> Python
- static handle cast(T&& src, return_value_policy /* policy */, handle /* parent */) {
- return PyFloat_FromDouble(src.toSec());
- }
-
- // Python -> C++
- bool load(handle src, bool convert) {
- if (hasattr(src, "to_sec")) {
- value = T(src.attr("to_sec")().cast());
- } else if (convert) {
- value = T(src.cast());
- } else
- return false;
- return true;
- }
-
- PYBIND11_TYPE_CASTER(T, _("Duration"));
-};
-
-template <>
-struct type_caster : DurationCaster
-{};
-
-/// Convert ROS message types (C++ <-> python)
-template ::value>>
-struct type_caster_ros_msg
-{
- // C++ -> Python
- static handle cast(const T& src, return_value_policy /* policy */, handle /* parent */) {
- // serialize src into (python) buffer
- std::size_t size = ros::serialization::serializationLength(src);
- object pbuffer = reinterpret_steal