moveit_visual_tools icon indicating copy to clipboard operation
moveit_visual_tools copied to clipboard

MoveItVisualTools::publishTrajectoryPath rejects valid Multi-DoF paths

Open werner291 opened this issue 3 years ago • 1 comments

Hello, the function bool MoveItVisualTools::publishTrajectoryPath(const moveit_msgs::RobotTrajectory& trajectory_msg, const robot_state::RobotStateConstPtr robot_state, bool blocking) has this bit in it:

// Check if we have enough points
if (!trajectory_msg.joint_trajectory.points.size())
{
    ROS_WARN_STREAM_NAMED(name_, "Unable to publish trajectory path because trajectory has zero points");
    return false;
}

Trajectories that have multi-DoF points, but no regular points, get rejected by that check.

werner291 avatar Apr 27 '21 11:04 werner291

Please test if adding something like || (trajectory_msg.joint_trajectory.multi_dof.size() != 0) fixes your problem and create a pull request (PR) for it. Ideally also provide a small example to test this (does not need to be a full unit-test, just something to run quickly)

simonschmeisser avatar May 11 '21 09:05 simonschmeisser