Comments (10)
As suggested, it is happening in the interpolate. I added some more print statements and resulted in this:
ros.ompl: base[RRTkConfigDefault]: Starting planning with 1 states already in datastructure
ros.ompl: Beginning sampling thread computation
ros.ompl: base[RRTkConfigDefault]: Created 35 states
ros.ompl: Solution found in 0.011115 seconds
ros.ompl: Stopped goal sampling thread after 3 sampling attempts
ros.rosconsole_bridge.urdfdom: There were 34 valid motions and 6 invalid motions.
ros.ompl: SimpleSetup: Path simplification took 0.000003 seconds and changed from 2 to 2 states
ros.rosconsole_bridge.urdfdom: Solution with 2 states before interpolate
ros.rosconsole_bridge.urdfdom: length: 0.066027, max_solution_segment_length_: 0.068000, minimum_waypoint_count_: 1.000000
ros.rosconsole_bridge.urdfdom: Returning successful solution with 10 states after interpolate
ros.moveit_ros_planning: Running 'Add Time Parameterization'
ros.moveit_ros_planning: Motion planner reported a solution path with 10 states
ros.moveit_ros_planning: Planned path was found to be valid when rechecked
ros.moveit_ros_move_group.actionlib: Setting the current goal as succeeded
ros.moveit_ros_move_group.actionlib: Setting status to succeeded on goal, id: /rviz_matt_Laptop_15944_7985327355976614980-5-1470350168.149427723, stamp: 1470350168.15
ros.moveit_ros_move_group.actionlib: Publishing result for goal with id: /rviz_matt_Laptop_15944_7985327355976614980-5-1470350168.149427723 and stamp: 1470350168.15
ros.moveit_ros_move_group.actionlib: Publishing feedback for goal, id: /rviz_matt_Laptop_15944_7985327355976614980-5-1470350168.149427723, stamp: 1470350168.15
ros.moveit_ros_move_group.actionlib: Publishing feedback for goal with id: /rviz_matt_Laptop_15944_7985327355976614980-5-1470350168.149427723 and stamp: 1470350168.15
The pertinent function is
void ompl_interface::ModelBasedPlanningContext::interpolateSolution()
{
if (ompl_simple_setup_->haveSolutionPath())
{
og::PathGeometric &pg = ompl_simple_setup_->getSolutionPath();
logDebug("%s: length: %f, max_solution_segment_length_: %f, minimum_waypoint_count_: %f", getName().c_str(),
pg.length(), max_solution_segment_length_, minimum_waypoint_count_);
pg.interpolate(std::max((unsigned int)floor(0.5 + pg.length() / max_solution_segment_length_), minimum_waypoint_count_));
}
}
How did we decide that the trajectory should have
(std::max((unsigned int)floor(0.5 + pg.length() / max_solution_segment_length_), minimum_waypoint_count_)
states?
from moveit.
I'd check what is the value of minimum_waypoint_count_
and where does it get set within moveit?
from moveit.
I printed all the values, not sure where they get set yet. But according to these numbers it should result in interpolate(1).
ros.rosconsole_bridge.urdfdom: length: 0.066027, max_solution_segment_length_: 0.068000, minimum_waypoint_count_: 1.000000
from moveit.
looks like 0.5 is to make it round up? still this evaluates to 1 AFAIK so it shouldn't change the number of states..
from moveit.
True enough, almost has to be something inside the actual pg.interpolate() function in ompl, or how we are using it. Because I printed the number of states on both sides of that function like this:
logDebug("%s: Solution with %lu states before interpolate", getName().c_str(),
getOMPLSimpleSetup()->getSolutionPath().getStateCount());
interpolateSolution();
// fill the response
logDebug("%s: Returning successful solution with %lu states after interpolate", getName().c_str(),
getOMPLSimpleSetup()->getSolutionPath().getStateCount());
and it resulted in the following:
ros.rosconsole_bridge.urdfdom: Solution with 2 states before interpolate
ros.rosconsole_bridge.urdfdom: length: 0.066027, max_solution_segment_length_: 0.068000, minimum_waypoint_count_: 1.000000
ros.rosconsole_bridge.urdfdom: Returning successful solution with 10 states after interpolate
from moveit.
Even stranger it looks like pg.interpolate(1) should be returning immediately.
void ompl::geometric::PathGeometric::interpolate(unsigned int requestCount)
{
if (requestCount < states_.size() || states_.size() < 2)
return;
...
from moveit.
@anderwm did you eventually get somewhere looking for the root of this problem?
from moveit.
Not exactly, I was confused by what appeared to be conflicting information:
- A call to getOMPLSimpleSetup()->getSolutionPath().getStateCount() before and after interpolateSolution() definately returns a different number of states but...
- pg.interpolate(1) should return immediately without changing the state variable at all
It feels like an abused pointer or a default value problem but I wasn't smart enough to follow the code flow and find it.
from moveit.
I have found that this property (minimum_waypoint_count) is a ros parameter and its default value is 10. If you look on your ROS param server for the parameter /move_group/ompl/minimum_waypoint_count, you will see that it is set to 10. I haven`t found a way to change this value during runtime. Changing the value on ROS param server is possible, however I do not want to do this manually everytime I start ROS server. This should be in one of the ompl config files but I do not know where...
from moveit.
@fatihirim the minimum_waypoint_count
variable is declared in https://github.com/ros-planning/moveit/blob/aac8c0de00d5f01c2c3e908b8f4028c84756a920/moveit_planners/ompl/ompl_interface/cfg/OMPLDynamicReconfigure.cfg#L8. If you want to change this value permanently, look into changing that file.
I don't think your question is related to this issue though: if you have questions that aren't bugs in MoveIt, they're best asked on Ros Answers. Please use that site if you have more questions in the future.
from moveit.
Related Issues (20)
- Collision Checking Request Not Respecting Group Name with Bullet HOT 5
- Group 'panda_manipulator' is empty & Link 'panda_hand_tcp' declared as part of a chain in group 'panda_manipulator' is not known to the URDF #141 HOT 2
- How to use python to control the franka gripper HOT 2
- IKFast MoveIt plugin Build Fail HOT 2
- orientation path constraint planning bug HOT 14
- Add progress to MoveGroupSequence Feedback HOT 5
- Unable to implement Moveit's Sequencing Capability in C++ HOT 1
- crash when run moveit_rviz.launch HOT 2
- Error 404 Moveit Noetic documentation HOT 2
- Noetic release 1.1.14
- Incorrect links along moveit organization HOT 3
- symbol lookup error HOT 1
- LoadScene operation causes existing objects to continue to be displayed without disappearing. HOT 4
- [servo_server-1] process has died [pid 929659, exit code -11, cmd.... HOT 1
- When moving the Nullspace-Slider, sometimes the robot's joint values ββcannot be returned to their original values. HOT 2
- Questionable State Update When Constraint Check Fails HOT 5
- Use moveit to set the UR realrobot's velocity by some function
- Time profiler for Moveit and/or OMPL
- moveit_servo for fiducial markers HOT 5
- ros2 humble moveit PluginlibFactory: The plugin for class 'moveit_task_constructor/Motion Planning Tasks' failed to load Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moveit.