Skip to content

Commit

Permalink
- Updates to support visualizing online planning example
Browse files Browse the repository at this point in the history
- 0.26.0
- Update changelogs
- Update rosinstall
  • Loading branch information
rjoomen authored and Levi-Armstrong committed Nov 19, 2024
1 parent 3b7e8b0 commit 77bfeb2
Show file tree
Hide file tree
Showing 21 changed files with 115 additions and 24 deletions.
8 changes: 4 additions & 4 deletions dependencies.repos
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ repositories:
tesseract:
type: git
url: https://github.com/tesseract-robotics/tesseract.git
version: 0.25.0
version: 0.26.0
trajopt:
type: git
url: https://github.com/tesseract-robotics/trajopt.git
version: 0.25.1
version: 0.26.0
tesseract_planning:
type: git
url: https://github.com/tesseract-robotics/tesseract_planning.git
version: 0.25.1
version: 0.26.0
tesseract_qt:
type: git
url: https://github.com/tesseract-robotics/tesseract_qt.git
version: 0.25.0
version: 0.26.0
descartes_light:
type: git
url: https://github.com/swri-robotics/descartes_light.git
Expand Down
8 changes: 4 additions & 4 deletions dependencies_with_ext.repos
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ repositories:
tesseract:
type: git
url: https://github.com/tesseract-robotics/tesseract.git
version: 0.25.0
version: 0.26.0
trajopt:
type: git
url: https://github.com/tesseract-robotics/trajopt.git
version: 0.25.1
version: 0.26.0
tesseract_planning:
type: git
url: https://github.com/tesseract-robotics/tesseract_planning.git
version: 0.25.1
version: 0.26.0
tesseract_qt:
type: git
url: https://github.com/tesseract-robotics/tesseract_qt.git
version: 0.25.0
version: 0.26.0
descartes_light:
type: git
url: https://github.com/swri-robotics/descartes_light.git
Expand Down
3 changes: 3 additions & 0 deletions tesseract_monitoring/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package tesseract_monitoring
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------

0.25.0 (2024-09-30)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion tesseract_monitoring/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>tesseract_monitoring</name>
<version>0.25.0</version>
<version>0.26.0</version>
<description>The tesseract_monitoring package</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>Apache 2.0</license>
Expand Down
3 changes: 3 additions & 0 deletions tesseract_msgs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package tesseract_msgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------

0.25.0 (2024-09-30)
-------------------
* Update to support Geometry Type CompoundMesh
Expand Down
1 change: 1 addition & 0 deletions tesseract_msgs/msg/JointTrajectory.msg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
tesseract_msgs/JointState[] states
string description # A description of the trajectory
string uuid # Unique ID
2 changes: 2 additions & 0 deletions tesseract_msgs/msg/Trajectory.msg
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ tesseract_msgs/StringDoublePair[] initial_state
string instructions

# If instructions are provided this will be ignored
string joint_trajectories_uuid
string joint_trajectories_description
tesseract_msgs/JointTrajectory[] joint_trajectories
2 changes: 1 addition & 1 deletion tesseract_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>tesseract_msgs</name>
<version>0.25.0</version>
<version>0.26.0</version>
<description>The tesseract_msgs package</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>Apache 2.0</license>
Expand Down
5 changes: 5 additions & 0 deletions tesseract_planning_server/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package tesseract_planning_server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------
* Update to latest tesseract
* Contributors: Levi Armstrong, Roelof Oomen

0.25.0 (2024-09-30)
-------------------
* Change timer to stopwatch
Expand Down
2 changes: 1 addition & 1 deletion tesseract_planning_server/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>tesseract_planning_server</name>
<version>0.25.0</version>
<version>0.26.0</version>
<description>Tesseract ROS Planning Server</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>Apache 2.0</license>
Expand Down
19 changes: 19 additions & 0 deletions tesseract_qt_ros/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
Changelog for package tesseract_qt_ros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------

0.25.0 (2024-09-29)
-------------------

0.24.0 (2024-08-15)
-------------------

0.23.0 (2024-07-25)
-------------------

0.22.0 (2024-06-11)
-------------------
* Leverage forward declarations (`#233 <https://github.com/tesseract-robotics/tesseract_ros/issues/233>`_)
* Contributors: Levi Armstrong

0.21.0 (2023-11-10)
-------------------

Expand All @@ -16,6 +33,8 @@ Changelog for package tesseract_qt_ros

0.18.1 (2023-07-10)
-------------------
* Add Tesseract Studio ROS executable
* Contributors: Levi Armstrong

0.18.0 (2023-07-03)
-------------------
Expand Down
2 changes: 1 addition & 1 deletion tesseract_qt_ros/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>tesseract_qt_ros</name>
<version>0.22.0</version>
<version>0.26.0</version>
<description>The tesseract_qt_ros package</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>LGPL3.0</license>
Expand Down
3 changes: 3 additions & 0 deletions tesseract_ros_examples/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package tesseract_ros_examples
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------

0.25.0 (2024-09-30)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion tesseract_ros_examples/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>tesseract_ros_examples</name>
<version>0.25.0</version>
<version>0.26.0</version>
<description>This package contains examples related to this trajopt_ros repository.</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>Apache 2.0</license>
Expand Down
5 changes: 5 additions & 0 deletions tesseract_rosutils/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package tesseract_rosutils
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------
* Update to latest tesseract
* Contributors: Levi Armstrong, Roelof Oomen

0.25.0 (2024-09-30)
-------------------
* Add plotToolpath for ToolPath
Expand Down
2 changes: 1 addition & 1 deletion tesseract_rosutils/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>tesseract_rosutils</name>
<version>0.25.0</version>
<version>0.26.0</version>
<description>Tesseract ROS Utilities</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>Apache 2.0</license>
Expand Down
10 changes: 10 additions & 0 deletions tesseract_rosutils/src/plotting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <thread>
#include <Eigen/Geometry>
#include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <rclcpp/rclcpp.hpp>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_rosutils/plotting.h>
#include <tesseract_rosutils/utils.h>

#include <tesseract_common/serialization.h>
#include <tesseract_command_language/utils.h>
#include <tesseract_command_language/composite_instruction.h>
#include <tesseract_motion_planners/core/utils.h>
Expand Down Expand Up @@ -128,6 +131,7 @@ void ROSPlotting::plotTrajectory(const tesseract_common::JointTrajectory& traj,
{
tesseract_msgs::msg::Trajectory msg;
msg.ns = std::move(ns);
msg.joint_trajectories_uuid = boost::uuids::to_string(traj.uuid);
msg.description = std::move(description);

if (!traj.empty())
Expand Down Expand Up @@ -167,6 +171,7 @@ void ROSPlotting::plotTrajectories(const tesseract_environment::Environment& env
{
tesseract_msgs::msg::Trajectory msg;
msg.ns = std::move(ns);
msg.joint_trajectories_uuid = boost::uuids::to_string(boost::uuids::random_generator()());
msg.description = std::move(description);

// Set tesseract state information
Expand All @@ -182,6 +187,10 @@ void ROSPlotting::plotTrajectories(const tesseract_environment::Environment& env
msg.initial_state.push_back(pair_msg);
}

msg.instructions =
tesseract_common::Serialization::toArchiveStringXML<tesseract_planning::InstructionPoly>(instructions[0]);
//.as<tesseract_planning::CompositeInstruction>()

// Convert to joint trajectories
for (const auto& instruction : instructions)
{
Expand All @@ -204,6 +213,7 @@ void ROSPlotting::plotTrajectory(const tesseract_environment::Commands& cmds,
{
tesseract_msgs::msg::Trajectory msg;
msg.ns = std::move(ns);
msg.joint_trajectories_uuid = boost::uuids::to_string(instruction.getUUID());
msg.description = std::move(description);

// Set the commands message
Expand Down
3 changes: 2 additions & 1 deletion tesseract_rosutils/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1670,8 +1670,8 @@ void toMsg(const tesseract_msgs::msg::EnvironmentState::SharedPtr& state_msg,

void toMsg(tesseract_msgs::msg::JointTrajectory& traj_msg, const tesseract_common::JointTrajectory& traj)
{
traj_msg.uuid = boost::uuids::to_string(traj.uuid);
traj_msg.description = traj.description;

for (const auto& js : traj)
{
assert(js.joint_names.size() == static_cast<unsigned>(js.position.size()));
Expand Down Expand Up @@ -1699,6 +1699,7 @@ void toMsg(tesseract_msgs::msg::JointTrajectory& traj_msg, const tesseract_commo
tesseract_common::JointTrajectory fromMsg(const tesseract_msgs::msg::JointTrajectory& traj_msg)
{
tesseract_common::JointTrajectory trajectory;
trajectory.uuid = boost::lexical_cast<boost::uuids::uuid>(traj_msg.uuid);
trajectory.description = traj_msg.description;
for (const auto& js_msg : traj_msg.states)
{
Expand Down
5 changes: 4 additions & 1 deletion tesseract_rviz/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
Changelog for package tesseract_rviz
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.26.0 (2024-11-19)
-------------------

0.25.0 (2024-09-30)
-------------------
* Update to support Geometry Type CompoundMesh
* Contributors: Roelof Oomen
* Contributors: Levi Armstrong, Roelof Oomen

0.23.0 (2024-08-21)
-------------------
Expand Down
2 changes: 1 addition & 1 deletion tesseract_rviz/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>tesseract_rviz</name>
<version>0.25.0</version>
<version>0.26.0</version>
<description>The tesseract_rviz package</description>
<maintainer email="[email protected]">Levi Armstrong</maintainer>
<license>BSD</license>
Expand Down
50 changes: 43 additions & 7 deletions tesseract_rviz/src/joint_trajectory_monitor_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@

#include <unordered_map>
#include <thread>
#include <boost/lexical_cast.hpp>
#include <boost/uuid/uuid_io.hpp>

#include <QApplication>

#include <tesseract_common/serialization.h>
#include <tesseract_environment/environment.h>
#include <tesseract_environment/command.h>
#include <tesseract_environment/commands.h>
#include <tesseract_command_language/composite_instruction.h>
#include <tesseract_command_language/utils.h>

namespace tesseract_rviz
{
Expand Down Expand Up @@ -62,6 +67,8 @@ struct JointTrajectoryMonitorProperties::Implementation

tesseract_common::JointTrajectorySet trajectory_set(initial_state);
tesseract_common::JointTrajectory joint_trajectory = tesseract_rosutils::fromMsg(*msg);
trajectory_set.setUUID(joint_trajectory.uuid);
trajectory_set.setDescription(joint_trajectory.description);
trajectory_set.appendJointTrajectory(joint_trajectory);
tesseract_gui::events::JointTrajectoryAdd event(component_info, trajectory_set);
QApplication::sendEvent(qApp, &event);
Expand Down Expand Up @@ -98,15 +105,44 @@ struct JointTrajectoryMonitorProperties::Implementation
if (!msg->ns.empty())
trajectory_set.setNamespace(msg->ns);

for (const auto& joint_trajectory_msg : msg->joint_trajectories)
if (!msg->instructions.empty())
{
tesseract_common::JointTrajectory joint_trajectory = tesseract_rosutils::fromMsg(joint_trajectory_msg);
trajectory_set.appendJointTrajectory(joint_trajectory);
auto ci = tesseract_common::Serialization::fromArchiveStringXML<tesseract_planning::CompositeInstruction>(
msg->instructions);
trajectory_set.setUUID(ci.getUUID());
trajectory_set.setDescription(ci.getDescription());
if (!ci.empty() && ci.front().isCompositeInstruction())
{
for (const auto& entry : ci)
{
const auto& sub_ci = entry.as<tesseract_planning::CompositeInstruction>();
tesseract_common::JointTrajectory joint_trajectory = tesseract_planning::toJointTrajectory(sub_ci);
trajectory_set.appendJointTrajectory(joint_trajectory);
}

tesseract_gui::events::JointTrajectoryAdd event(component_info, trajectory_set);
QApplication::sendEvent(qApp, &event);
}
else
{
tesseract_common::JointTrajectory joint_trajectory = tesseract_planning::toJointTrajectory(ci);
trajectory_set.appendJointTrajectory(joint_trajectory);
tesseract_gui::events::JointTrajectoryAdd event(component_info, trajectory_set);
QApplication::sendEvent(qApp, &event);
}
}
else
{
trajectory_set.setUUID(boost::lexical_cast<boost::uuids::uuid>(msg->joint_trajectories_uuid));
trajectory_set.setDescription(msg->joint_trajectories_description);
for (const auto& joint_trajectory_msg : msg->joint_trajectories)
{
tesseract_common::JointTrajectory joint_trajectory = tesseract_rosutils::fromMsg(joint_trajectory_msg);
trajectory_set.appendJointTrajectory(joint_trajectory);
tesseract_gui::events::JointTrajectoryAdd event(component_info, trajectory_set);
QApplication::sendEvent(qApp, &event);
}
}

trajectory_set.setDescription(msg->description);
tesseract_gui::events::JointTrajectoryAdd event(component_info, trajectory_set);
QApplication::sendEvent(qApp, &event);
}
catch (...)
{
Expand Down

0 comments on commit 77bfeb2

Please sign in to comment.