43 namespace bind_robot_trajectory
45 moveit_msgs::msg::RobotTrajectory
47 const std::vector<std::string>& joint_filter)
49 moveit_msgs::msg::RobotTrajectory msg;
65 py::class_<robot_trajectory::RobotTrajectory, std::shared_ptr<robot_trajectory::RobotTrajectory>>(
robot_trajectory,
68 Maintains a sequence of waypoints and the durations between these waypoints.
71 .def(py::init<const std::shared_ptr<const moveit::core::RobotModel>&>(),
73 Initializes an empty robot trajectory from a robot model.
76 :py:class:`moveit_py.core.RobotModel`: The robot model associated to the instantiated robot state.
81 Get the waypoint at the specified index in the trajectory.
84 :py:class:`moveit_py.core.RobotState`: The robot state corresponding to a waypoint at the specified index in the trajectory.
89 py::keep_alive<0, 1>() ,
91 Iterate over the waypoints in the trajectory.
97 int: The number of waypoints in the trajectory.
102 Reverse the trajectory.
108 str: The name of the joint model group that this trajectory is for.
113 :py:class:`moveit_py.core.RobotModel`: The robot model that this trajectory is for.
118 float: The duration of the trajectory.
123 float: The average duration of the segments in the trajectory.
128 Unwind the trajectory.
133 Get the durations from the previous waypoint in the trajectory.
136 list of float: The duration from previous of each waypoint in the trajectory.
139 py::arg(
"velocity_scaling_factor"), py::arg(
"acceleration_scaling_factor"), py::kw_only(),
140 py::arg(
"path_tolerance") = 0.1, py::arg(
"resample_dt") = 0.1, py::arg(
"min_angle_change") = 0.001,
142 Adds time parameterization to the trajectory using the Time-Optimal Trajectory Generation (TOTG) algorithm.
145 velocity_scaling_factor (float): The velocity scaling factor.
146 acceleration_scaling_factor (float): The acceleration scaling factor.
147 path_tolerance (float): The path tolerance to use for time parameterization (default: 0.1).
148 resample_dt (float): The time step to use for time parameterization (default: 0.1).
149 min_angle_change (float): The minimum angle change to use for time parameterization (default: 0.001).
151 bool: True if the trajectory was successfully retimed, false otherwise.
154 py::arg(
"acceleration_scaling_factor"), py::kw_only(), py::arg(
"mitigate_overshoot") =
false,
155 py::arg(
"overshoot_threshold") = 0.01,
157 Applies Ruckig smoothing to the trajectory.
160 velocity_scaling_factor (float): The velocity scaling factor.
161 acceleration_scaling_factor (float): The acceleration scaling factor.
162 mitigate_overshoot (bool): Whether to mitigate overshoot during smoothing (default: false).
163 overshoot_threshold (float): The maximum allowed overshoot during smoothing (default: 0.01).
165 bool: True if the trajectory was successfully retimed, false otherwise.
168 py::arg(
"joint_filter") = std::vector<std::string>(),
170 Get the trajectory as a moveit_msgs.msg.RobotTrajectory message.
173 joint_filter (list[string]): List of joints to consider in creating the message. If empty, uses all joints.
175 moveit_msgs.msg.RobotTrajectory: A ROS robot trajectory message.
180 Set the trajectory from a moveit_msgs.msg.RobotTrajectory message.
183 robot_state (:py:class:`moveit_py.core.RobotState`): The reference robot starting state.
184 msg (moveit_msgs.msg.RobotTrajectory): A ROS robot trajectory message.
Representation of a robot's state. This includes position, velocity, acceleration and effort.
Maintain a sequence of waypoints and the time durations between these waypoints.
RobotTrajectory & reverse()
const std::string & getGroupName() const
const moveit::core::RobotModelConstPtr & getRobotModel() const
double getAverageSegmentDuration() const
RobotTrajectory & unwind()
RobotTrajectory & setGroupName(const std::string &group_name)
const std::deque< double > & getWayPointDurations() const
std::size_t getWayPointCount() const
const moveit::core::RobotState & getWayPoint(std::size_t index) const
double getDuration() const
robot_trajectory::RobotTrajectory setRobotTrajectoryMsg(const std::shared_ptr< robot_trajectory::RobotTrajectory > &robot_trajectory, const moveit::core::RobotState &robot_state, const moveit_msgs::msg::RobotTrajectory &msg)
moveit_msgs::msg::RobotTrajectory getRobotTrajectoryMsg(const robot_trajectory::RobotTrajectoryConstPtr &robot_trajectory, const std::vector< std::string > &joint_filter)
void initRobotTrajectory(py::module &m)
bool applyTOTGTimeParameterization(robot_trajectory::RobotTrajectory &trajectory, double velocity_scaling_factor, double acceleration_scaling_factor, double path_tolerance=0.1, double resample_dt=0.1, double min_angle_change=0.001)
Applies time parameterization to a robot trajectory using the Time-Optimal Trajectory Generation (TOT...
bool applyRuckigSmoothing(robot_trajectory::RobotTrajectory &trajectory, double velocity_scaling_factor, double acceleration_scaling_factor, bool mitigate_overshoot=false, double overshoot_threshold=0.01)
Applies Ruckig smoothing to a robot trajectory.