From f53e57e4bf681e5e44d1379d4954efe91fe07a8f Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Tue, 22 Dec 2020 10:52:40 -0800 Subject: [PATCH] Add JointTrajectory message (#106) (#117) Signed-off-by: Andrej Orsula Co-authored-by: Andrej Orsula --- proto/ignition/msgs/joint_trajectory.proto | 47 +++++++++++++++ .../msgs/joint_trajectory_point.proto | 57 +++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 proto/ignition/msgs/joint_trajectory.proto create mode 100644 proto/ignition/msgs/joint_trajectory_point.proto diff --git a/proto/ignition/msgs/joint_trajectory.proto b/proto/ignition/msgs/joint_trajectory.proto new file mode 100644 index 00000000..d9a6f0d5 --- /dev/null +++ b/proto/ignition/msgs/joint_trajectory.proto @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2020 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package ignition.msgs; +option java_package = "com.ignition.msgs"; +option java_outer_classname = "JointTrajectoryProtos"; + +/// \ingroup ignition.msgs +/// \interface JointTrajectory +/// \brief Message for joint trajectory, which can be used to control a model +/// with multiple single-axis joints simultaneously. This message is utilised +/// by JointTrajectoryController plugin + +import "ignition/msgs/header.proto"; +import "ignition/msgs/joint_trajectory_point.proto"; + +message JointTrajectory +{ + /// \brief Optional header data + Header header = 1; + + /// \brief Ordered list of joint names that must be active during execution + /// of this trajectory. The order shall correspond to the values in each + /// trajectory point + repeated string joint_names = 2; + + /// \brief Ordered list of time-parameterised trajectory points, which can + /// describe positions, velocities, accelerations and/or effort for all + /// active joints at each point in time. All points must be ordered + /// according to their time from start, which must be strictly increasing + repeated JointTrajectoryPoint points = 3; +} diff --git a/proto/ignition/msgs/joint_trajectory_point.proto b/proto/ignition/msgs/joint_trajectory_point.proto new file mode 100644 index 00000000..40d43289 --- /dev/null +++ b/proto/ignition/msgs/joint_trajectory_point.proto @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2020 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package ignition.msgs; +option java_package = "com.ignition.msgs"; +option java_outer_classname = "JointTrajectoryPointProtos"; + +/// \ingroup ignition.msgs +/// \interface JointTrajectoryPoint +/// \brief Message that specifies the desired state of all single-axis joints +/// at a specific trajectory point. All values for each joint must be ordered +/// according to the joint names provided in JointTrajectory message + +import "ignition/msgs/duration.proto"; + +message JointTrajectoryPoint +{ + /// \brief Position of each joint relative to their "0" position. Units are + /// dependent on the joint type, where radians are used for revolute or + /// continuous joints, and meters for prismatic joints + repeated double positions = 1; + + /// \brief Rate of change in position of each joint. Units are dependent on + /// the joint type, where radians/second are used for revolute or continuous + /// joints, and meters/second for prismatic joints + repeated double velocities = 2; + + /// \brief Rate of change in velocity of each joint. Units are dependent on + /// the joint type, where radians/second^2 are used for revolute or + /// continuous joints, and meters/second^2 for prismatic joints + repeated double accelerations = 3; + + /// \brief Torque or force applied at each joint. Units are dependent on the + /// joint type, where newton-meters are used for revolute or continuous + /// joints (torque), and newtons for prismatic joints (force) + repeated double effort = 4; + + /// \brief Desired time from the beginning of trajectory execution until + /// this trajectory point should be reached. This value must be strictly + /// increasing for consecutive points + Duration time_from_start = 5; +}