You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that the "planning_scene->getCollisionWorld().get()" is returning a NULL pointer. I don't understand it completely. But, I could work around the problem by adding a new CollisionDetectorHybrid to the planning scene and calling the setActiveCollisionDetector() to set it to active.
However, now I encounter the following problem:
No link state found for link jaco_link_finger_1
I am guessing that this has to do something with the urdf or srdf.
While setting up a planning scene, is it enough to set it up for the planner like it is done in Stomp? Or should one use the PlanningSceneMonitor read-write class? What is the difference?
Update
Both approaches seem to give the same results. I still get the "no link state found" error for the finger links.
@jrgnicho Do you have a moveit simulation setup (on which stomp works) to test chomp? That way we have something common to test on, perhaps?
On Fri, Aug 05, 2016 at 02:49:53AM -0700, Chittaranjan Srinivas Swaminathan wrote:
While setting up a planning scene, is it enough to set it up for the planner like it is done in Stomp?
Or should one use the PlanningSceneMonitor read-write class? What is the difference?
@ksatyaki There is a stomp_test_kr_moveit_config package that you can use for your testing. It's already configured to load the stomp planner instead of ompl. Essentially, you must create a planning_plugin for your planner using the pluginlib library as shown here and by setting up a plugin.xml file with the plugin information. Then, in your moveit_config package, you define a [your_planner_name]_moveit_planning_pipeline.launch file (see example) and then have the move_group.launch file load it by setting the pipeline parameter to your planner's name.
Since the planner is loaded by the move_group node I don't think there's any need to maintain a planning scene monitor inside your planner, in fact move_group should ensured that the planning_scene pointer gets passed to the planner before requesting a to solve a motion plan.
I have tried using the config. I still get a similar error.
No link state found for link gripper_body
I have tried commenting the return statement when a link state is not found. It appears that not all links have a corresponding link state. I am not entirely sure why this is the case or how this works. But when I do that, I get the error:
No link body decomposition for link workcell_bounds
@ksatyaki the code in moveit_experimental was copied into industrial_moveit where it went through some further development. You should try switching to that repo instead. It be helpful if you were to provide a more detailed description of the workflow that you follow that exposes these issues.
@jrgnicho Oh, thanks. It looks like the last commit on the other repo pertains to my error.
I am starting the "demo.launch" for the config you gave me, but with the chomp plugin. Then I issue a simple goal using rviz. Once the planner receives the goal, the error occurs.
@ksatyaki yes it looks like the commit may address that "No link body decomposition ... " issue you saw. See if you still get it after switching to the newer `moveit_experimental' code.
@jrgnicho After trying to use the moveit_experimental package from industrial_moveit, I still get the error
No link body decomposition for link workcell_bounds
Related question.
I am not sure I am initializing the planning scene correctly.
I used the STOMP moveit interface as an example and I create one planning context per JointModelGroup. So in the initialize function of the PlannerManager I do,
bool initialize(const robot_model::RobotModelConstPtr& model, const std::string &ns)
{
std::vector <std::string> groups = model->getJointModelGroupNames();
ROS_INFO_STREAM("Following groups exist:");
for(int i = 0; i < groups.size(); i++) {
ROS_INFO("%s", groups[i].c_str());
planning_contexts_[groups[i]] = ChompPlanningContextPtr(new ChompPlanningContext("chomp_planning_context", groups[i], model));
}
return true;
}
I have an update on where the error happens and why.
When I add a collision detector as mentioned in the previous post, it simply creates an empty CollisionRobotDistanceField using the first constructor. So the link_body_decomposition_vector_ is not initialized.
I am wondering how one could initialize this class properly or add a Collision Detector properly.
@ksatyaki I'm hoping you can help me here. I've been trying to extract the signed distance field (SDF) functionality from CHOMP -- I simply want to write a method PlanningScene::CheckSDF that gives me a vector of distance values from each robot sphere to its nearest obstacle. With the following code I came across this issue,
const collision_detection::CollisionWorldHybrid* hy_world;
const collision_detection::CollisionRobotHybrid* hy_robot;
hy_world =
dynamic_cast< const collision_detection::CollisionWorldHybrid* >(
planning_scene_->getCollisionWorld(planning_scene_->getActiveCollisionDetectorName()).get());
if (!hy_world) {
std::cerr << "Could not initialize hybrid collision world from planning scene" << std::endl;
return false;
}
hy_robot = dynamic_cast<const collision_detection::CollisionRobotHybrid*>(
planning_scene_->getCollisionRobot(planning_scene_->getActiveCollisionDetectorName()).get()
);
if (!hy_robot) {
std::cerr << "Could not initialize hybrid collision robot from planning scene" << std::endl;
return false;
}
auto req = collision_detection::CollisionRequest();
auto res = collision_detection::CollisionResult();
moveit::core::RobotState state(robot_model_);
collision_detection::GroupStateRepresentationPtr gsr;
auto robot = *hy_robot->getCollisionRobotDistanceField().get();
hy_world->checkCollisionDistanceField(req, res, robot, state, gsr); // Passthrough to `cworld_distance_->checkCollision(req, res, robot, state, gsr);`
// Debug lines to see what's going on:
int num_collision_points_ = 0;
std::map<std::string, std::string> fixed_link_resolution_map;
std::cout << "Num grads = "<< gsr->gradients_.size() << std::endl;
for (auto g = 0; g < gsr->gradients_.size(); g++)
{
num_collision_points_ += gsr->gradients_[g].gradients.size();
collision_detection::GradientInfo& info = gsr->gradients_[g];
std::vector<double> distances = info.distances;
std::cout << distances.size() << std::endl;
}
which gives me the Could not initialize hybrid collision world from planning scene error message.
Also note that I can use PlanningScene::CheckCollision and then look at the CollisionResult for the distance value, but this only gives me one distance value for the full robot.
I'm using the collision_distance_field package from moveit_experimental. Any help you can offer me would be greatly appreciated 😄
It's been a long time since I worked on this package. So it is possible that I might be of no help at all. I will try, nevertheless :-)
I am not sure what you mean by "extract the signed distance field (SDF) functionality from CHOMP". Do you simply want to use the SDF Functions?
If that is the case, take a look at this repo. On the devel branch we have a sdf_tracker_grasping, sdf_tracker_msgs and sdf_collision_check. I suggest these, because they are maintained at our University at the moment and we can provide help in using these packages. These packages are not dependent on the rest of the grasping stack, so you should be able to use them separately.
However, you might find in that repository how we use this SDF tracker along with the collision checker. Maybe the author of sdf_tracker, @dcanelhas, can provide some help too.
For the issue at hand, I believe that there is something fishy with the moveit configuration files / parameters that leads to the error, "Could not initialize hybrid collision world from planning scene". But I am not sure what.
Thank you for the quick reply @ksatyaki! I'll look through the SDF functions in that repo and follow-up later.
What I mean by "extract the SDF functionality from CHOMP", I mean that I'd like to use a sphere-robot model and a distance field to check for collisions during motion planning, but I'll be using a different optimization algorithm. Importantly, I need the distance field to provide a vector of distances at a given state, one value for each of the robot's spheres to the nearest obstacle.
Regarding that error message, I believe it's due to a null pointer from getCollisionWorld, as mentioned earlier in this thread.
I appreciate you sharing your grasping code @ksatyaki, but I'm constrained to use the PlanningScene class provided by MoveIt. It looks like the sdf_X code is all custom and independent from the MoveIt package. That is, I already have an initialized PlanningScene with pointcloud info, and all I need is a simple function that returns a 3-dimensional std::vector representing a distance field.
I noticed this issue is closed, but let me know if I can be of assistance. It seems if you are working with point cloud data, you probably don't want the full volumetric SDF representation just to get the distances. You're better off using eg nanoflann to build a kd tree in tiles and doing a nn lookup, and computing the point to plane distance.
@dcanelhas thank you for the tip. Would you be able to point me to some more info on that approach? Is it something included in ROS or MoveIt (I hope!)?
@ksatyaki do you mean the code I posted, using collision distance field from moveit_experimental, would work fine? Regarding the null pointer, I'm referring to your earlier comment in this thread.
@BoltzmannBrain have a look at KdTreeFLANN Assume you have a query point q and a obtain the nearest map point p with associated normal n, the (signed) point-to-plane distance is simply
dot( (p-q), n)
@ksatyaki I have problem when I install stomp planner (Moveit/Rviz) (indigo) no library loading in my package.I found this error (process has died) as you see. anyone see this before to help me!!!
Activity
ksatyaki commentedon Aug 4, 2016
Update
I discovered that the "planning_scene->getCollisionWorld().get()" is returning a NULL pointer. I don't understand it completely. But, I could work around the problem by adding a new CollisionDetectorHybrid to the planning scene and calling the setActiveCollisionDetector() to set it to active.
However, now I encounter the following problem:
I am guessing that this has to do something with the urdf or srdf.
Ry0 commentedon Aug 4, 2016
I'm also facing that problem.
I just tried your
moveit_planner(https://github.com/ksatyaki/moveit_planners).The following errors are not happened.
But, The following description is output.
After the output,
move_groupprocess died.I have a question.
Do you use
ros-planning/moveit_experimentalfor usingcollision_distance_fieldpackage?(https://github.com/ros-planning/moveit_experimental)
jrgnicho commentedon Aug 4, 2016
@ksatyaki are you implementing a
planning_interface::PlannerManagerandplanning_interface::PlanningContext. These classes define the planning workflow which involves initializing the planning scene before calling the solve method on the planner. Take a look at the stomp_planner_manager.h and stomp_planner.h if you need an example of thisdavetcoleman commentedon Aug 4, 2016
@jbohren has worked with CHOMP and moveit_experimental, see davetcoleman#2
Would be great to get that PR or your work merged into MoveIt soon
@jrgnicho can probably advise on this subject also... wait he already did :)
ksatyaki commentedon Aug 4, 2016
@jrgnicho Thanks so much. I will get back soon after I look at the stomp. :)
@davetcoleman Thanks again!
@Ry0 I am using @jrgnicho's moveit_experimental ... This one is ported to the new moveit API. And to catkin ...
Merge pull request moveit#15 from davetcoleman/jade-fix-ros-control
ksatyaki commentedon Aug 5, 2016
While setting up a planning scene, is it enough to set it up for the planner like it is done in Stomp? Or should one use the PlanningSceneMonitor read-write class? What is the difference?
Update
Both approaches seem to give the same results. I still get the "no link state found" error for the finger links.
@jrgnicho Do you have a moveit simulation setup (on which stomp works) to test chomp? That way we have something common to test on, perhaps?
v4hn commentedon Aug 5, 2016
On Fri, Aug 05, 2016 at 02:49:53AM -0700, Chittaranjan Srinivas Swaminathan wrote:
See http://moveit.ros.org/documentation/concepts/ on Planning Scene.
If you like to have the scene updated with the robot's joint states, etc. you will need a monitor.
jrgnicho commentedon Aug 5, 2016
@ksatyaki There is a stomp_test_kr_moveit_config package that you can use for your testing. It's already configured to load the stomp planner instead of ompl. Essentially, you must create a planning_plugin for your planner using the pluginlib library as shown here and by setting up a plugin.xml file with the plugin information. Then, in your moveit_config package, you define a [your_planner_name]_moveit_planning_pipeline.launch file (see example) and then have the move_group.launch file load it by setting the pipeline parameter to your planner's name.
Since the planner is loaded by the move_group node I don't think there's any need to maintain a planning scene monitor inside your planner, in fact move_group should ensured that the planning_scene pointer gets passed to the planner before requesting a to solve a motion plan.
ksatyaki commentedon Aug 7, 2016
I have tried using the config. I still get a similar error.
I have tried commenting the return statement when a link state is not found. It appears that not all links have a corresponding link state. I am not entirely sure why this is the case or how this works. But when I do that, I get the error:
I am wondering if the code in collision_robot_distance_field.cpp needs some update.
jrgnicho commentedon Aug 8, 2016
@ksatyaki the code in moveit_experimental was copied into industrial_moveit where it went through some further development. You should try switching to that repo instead. It be helpful if you were to provide a more detailed description of the workflow that you follow that exposes these issues.
ksatyaki commentedon Aug 8, 2016
@jrgnicho Oh, thanks. It looks like the last commit on the other repo pertains to my error.
I am starting the "demo.launch" for the config you gave me, but with the chomp plugin. Then I issue a simple goal using rviz. Once the planner receives the goal, the error occurs.
jrgnicho commentedon Aug 8, 2016
@ksatyaki yes it looks like the commit may address that "No link body decomposition ... " issue you saw. See if you still get it after switching to the newer `moveit_experimental' code.
ksatyaki commentedon Aug 11, 2016
@jrgnicho After trying to use the moveit_experimental package from industrial_moveit, I still get the error
Related question.
I am not sure I am initializing the planning scene correctly.
I used the STOMP moveit interface as an example and I create one planning context per JointModelGroup. So in the initialize function of the PlannerManager I do,
Where planning_contexts_ is
And in the constructor of the ChompPlanningContext I do,
Does this make sense?
It appears that may be none of the link body decompositions are initialized.
ksatyaki commentedon Aug 15, 2016
I have an update on where the error happens and why.
When I add a collision detector as mentioned in the previous post, it simply creates an empty CollisionRobotDistanceField using the first constructor. So the
link_body_decomposition_vector_is not initialized.I am wondering how one could initialize this class properly or add a Collision Detector properly.
13 remaining items
davetcoleman commentedon Oct 27, 2016
This has been completed except documentation, issue: #237
BoltzmannBrain commentedon Jan 24, 2018
@ksatyaki I'm hoping you can help me here. I've been trying to extract the signed distance field (SDF) functionality from CHOMP -- I simply want to write a method
PlanningScene::CheckSDFthat gives me a vector of distance values from each robot sphere to its nearest obstacle. With the following code I came across this issue,which gives me the
Could not initialize hybrid collision world from planning sceneerror message.Also note that I can use
PlanningScene::CheckCollisionand then look at theCollisionResultfor the distance value, but this only gives me one distance value for the full robot.I'm using the collision_distance_field package from moveit_experimental. Any help you can offer me would be greatly appreciated 😄
ksatyaki commentedon Jan 25, 2018
It's been a long time since I worked on this package. So it is possible that I might be of no help at all. I will try, nevertheless :-)
I am not sure what you mean by "extract the signed distance field (SDF) functionality from CHOMP". Do you simply want to use the SDF Functions?
If that is the case, take a look at this repo. On the devel branch we have a sdf_tracker_grasping, sdf_tracker_msgs and sdf_collision_check. I suggest these, because they are maintained at our University at the moment and we can provide help in using these packages. These packages are not dependent on the rest of the grasping stack, so you should be able to use them separately.
However, you might find in that repository how we use this SDF tracker along with the collision checker. Maybe the author of sdf_tracker, @dcanelhas, can provide some help too.
For the issue at hand, I believe that there is something fishy with the moveit configuration files / parameters that leads to the error, "Could not initialize hybrid collision world from planning scene". But I am not sure what.
Sorry if I haven't been of any help :)
BoltzmannBrain commentedon Jan 25, 2018
Thank you for the quick reply @ksatyaki! I'll look through the SDF functions in that repo and follow-up later.
What I mean by "extract the SDF functionality from CHOMP", I mean that I'd like to use a sphere-robot model and a distance field to check for collisions during motion planning, but I'll be using a different optimization algorithm. Importantly, I need the distance field to provide a vector of distances at a given state, one value for each of the robot's spheres to the nearest obstacle.
Regarding that error message, I believe it's due to a null pointer from getCollisionWorld, as mentioned earlier in this thread.
BoltzmannBrain commentedon Jan 25, 2018
I appreciate you sharing your grasping code @ksatyaki, but I'm constrained to use the PlanningScene class provided by MoveIt. It looks like the sdf_X code is all custom and independent from the MoveIt package. That is, I already have an initialized PlanningScene with pointcloud info, and all I need is a simple function that returns a 3-dimensional std::vector representing a distance field.
dcanelhas commentedon Jan 26, 2018
I noticed this issue is closed, but let me know if I can be of assistance. It seems if you are working with point cloud data, you probably don't want the full volumetric SDF representation just to get the distances. You're better off using eg nanoflann to build a kd tree in tiles and doing a nn lookup, and computing the point to plane distance.
ksatyaki commentedon Jan 26, 2018
@BoltzmannBrain I don't know why there is a null pointer returned. If I remember correctly, collision distance field worked fine when I tried it.
BoltzmannBrain commentedon Jan 26, 2018
@dcanelhas thank you for the tip. Would you be able to point me to some more info on that approach? Is it something included in ROS or MoveIt (I hope!)?
BoltzmannBrain commentedon Jan 26, 2018
@ksatyaki do you mean the code I posted, using collision distance field from moveit_experimental, would work fine? Regarding the null pointer, I'm referring to your earlier comment in this thread.
dcanelhas commentedon Jan 26, 2018
@BoltzmannBrain have a look at KdTreeFLANN Assume you have a query point q and a obtain the nearest map point p with associated normal n, the (signed) point-to-plane distance is simply
dot( (p-q), n)
khalilibrahim commentedon Apr 11, 2019
@ksatyaki I have problem when I install stomp planner (Moveit/Rviz) (indigo) no library loading in my package.I found this error (process has died) as you see. anyone see this before to help me!!!

omeranar1 commentedon Oct 26, 2021
moveit_servo/src/collision_check.cpp can measure "self_collision_distance_" but not the "scene_collision_distance_"
scene_ro->getCollisionWorld()->getWorld()->size() is 0
simonschmeisser commentedon Oct 26, 2021
Please don't necromance old and unrelated issues, try getting feedback on answers.ros.org or discourse or open a new and complete issue