ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error message "Unable to sample any valid state for goal tree" usually means that either there is a collision for the position you requested, or the position cannot be reached for whatever reason.

The most common error for this is that the orientation of your end effector pose is not what you expect it to be. Check that your start and goal poses are similar by publishing them using rviz_visual_tools:

#include <rviz_visual_tools/rviz_visual_tools.h>

rviz_visual_tools::RvizVisualToolsPtr visual_tools_;
visual_tools_.reset(new rviz_visual_tools::RvizVisualTools("world","/rviz_visual_markers"));
visual_tools_->publishAxis(pose_not_stamped);
visual_tools_->trigger();

(Don't forget to include rviz_visual_tools in your CMakeLists.txt and package.xml, and adding a MarkerArray subscribed to /rviz_visual_markers to your Rviz window.)

When debugging move_group.getCurrentPose(), it is wise to do a sanity check by outputting (or visualizing) the pose, or you might get mixed up between different frames of reference:

ROS_INFO_STREAM("PoseStamped ps in " << ps.header.frame_id << " is: " << ps.pose.position.x << ", " << ps.pose.position.y << ", " << ps.pose.position.z);

Note that setTargetPose() by default sets the target pose for the frame that is defined as the end of your kinematic chain or end effector for your robot. Which frame is it? What is its orientation? You can check in the srdf of your robot, by using the moveit_setup_assistant, and by showing the TF frames in Rviz.

The error message "Unable to sample any valid state for goal tree" usually means that either there is a collision for the position you requested, or the position cannot be reached for whatever reason.

The most common error for this is that the orientation of your end effector pose is not what you expect it to be. Check that your start and goal poses are similar by publishing them using rviz_visual_tools:

#include <rviz_visual_tools/rviz_visual_tools.h>

rviz_visual_tools::RvizVisualToolsPtr visual_tools_;
visual_tools_.reset(new rviz_visual_tools::RvizVisualTools("world","/rviz_visual_markers"));
visual_tools_->publishAxis(pose_not_stamped);
visual_tools_->trigger();

(Don't forget to include rviz_visual_tools in your CMakeLists.txt and package.xml, and adding a MarkerArray subscribed to /rviz_visual_markers to your Rviz window.)

When debugging move_group.getCurrentPose(), it is wise to do a sanity check by outputting (or visualizing) the pose, or you might get mixed up between different frames of reference:

ROS_INFO_STREAM("PoseStamped ps in " << ps.header.frame_id << " is: " << ps.pose.position.x << ", " << ps.pose.position.y << ", " << ps.pose.position.z);

ps.pose.position.z);

Note that setTargetPose() by default sets the target pose for the frame that is defined as the end of your kinematic chain or end effector for your robot. Which frame is it? What is its orientation? You can check in the srdf of your robot, by using the moveit_setup_assistant, and by showing the TF frames in Rviz.

The error message "Unable to sample any valid state for goal tree" usually means that either there is a collision for the position you requested, or the position cannot be reached for whatever reason.

The most common error for this is that the orientation of your end effector pose is not what you expect it to be. Check that your start and goal poses are similar by publishing them using rviz_visual_tools:

#include <rviz_visual_tools/rviz_visual_tools.h>

rviz_visual_tools::RvizVisualToolsPtr visual_tools_;
visual_tools_.reset(new rviz_visual_tools::RvizVisualTools("world","/rviz_visual_markers"));
visual_tools_->publishAxis(pose_not_stamped);
visual_tools_->trigger();

(Don't forget to include rviz_visual_tools in your CMakeLists.txt and package.xml, and adding a MarkerArray subscribed to /rviz_visual_markers to your Rviz window.)

When debugging move_group.getCurrentPose(), it is wise to do a sanity check by outputting (or visualizing) the pose, or you might get mixed up between different frames of reference:

ROS_INFO_STREAM("PoseStamped ps in " << ps.header.frame_id << " is: " << ps.pose.position.x << ", " << ps.pose.position.y << ", " << ps.pose.position.z);

Note that setTargetPose() by default sets the target pose for the frame that is defined as the end of your kinematic chain or end effector for your robot. Which frame is it? What is its orientation? You can check in the srdf of your robot, by using the moveit_setup_assistant, and by showing the TF frames in Rviz.

Rviz, or by using the getEndEffectorLink() function of the MoveGroupInterface.

Lastly, make sure you are not sending multiple conflicting goals to the robot. Check the getPoseTargets() and clearPoseTargets() functions of the MoveGroupInterface.