-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialze planning graph using the robotstate #213
Comments
Interesting that you get different plans each time. Are they all the "same" cost (e.g. just a twist of joint 6)? I seed my paths by including the current position of the robot as a point in the trajectory to solve. Specifically, put a |
I misread your comment, and misunderstood the JoinTrajectryPt. I now realize that that is actually a point in the trajectory defined with joint angles. That might very well be my solution. Old response: I do start the trajectory with the current pose of the robot as the first trajectory point. This point is of the I must also add that I am still running on the Indigo version, but I have seen a similar result when using the Kinetic version build from the latest commit. I suspect that in the Indigo version it has to do with the virtual_vertex being added to the graph, as to be able to search all possible solution. This does mean that all the possible starting poses can be selected as the most optimal solution, instead of the actual pose of the robot. I have looked at how to replace the virtual_vertex with the actual vertex that represents the current robot state, but have not been able to come up with the code required. |
Thank you, seeding the planner by including the current pose solved my problem. I will look into writing a test program to see if the cost is the same for the paths where the robot pose is changed. |
I realize this was 2 years ago but I am have a seemingly isomorphic problem. Paths planned for my UR5e tend to end up in a joint configuration which causes problems with my tooling. Sometimes the paths plan properly in a configuration where wrist_3 does not point down. Being able to set a first point's joint coordinates would probably cause it to optimize toward the correct solution, but it seems like the planner only takes in a vector descartes_core::trajectory_pt rather than the standard jointtrajectorypt which contains joint state information, rather than the (seemingly) strictly cartesian space information contained in the descartes_core type. What are you doing differently to prepend a joint-space point to your input trajectory? Edit |
I am currently using Descartes with an UR5 arm to perform the task of combining a nut and bolt. I like Descartes because in my experience it produces superior Cartesian paths, and in my application the yaw of the end effector is not important.
However, I am running in to the problem that the robot pose changes when a new path is computed. Because the UR can produce 4 valid IK solutions for a given pose in my path, the planner can end up with a trajectory where the robot pose is changed from the actual pose to a different solution for the same point.
When looking through the source for Descartes, I stumbled upon a possible solution:
planning_graph.h
// TODO: add constructor that takes RobotState as param PlanningGraph(descartes_core::RobotModelConstPtr model);
I would think that if this TODO is worked out, this would solve my problem. This should allow me to seed the PlanningGraph::getShortestPath() with the current robot state as the start state. Please correct me if I am wrong here.
Sadly, I can't seem to figure out how to do this myself, so any help is appreciated.
The text was updated successfully, but these errors were encountered: