trajopt | Trajectory optimization algorithms for robotic control | Robotics library
kandi X-RAY | trajopt Summary
kandi X-RAY | trajopt Summary
Trajectory optimization algorithms for robotic control.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Animation a rollout
- Set the environment
- Return the environment state of the experiment
- Perform a single simulation step
- Train a single iteration
- Do rollouts
- Advance the simulation time
- Gather paths from parallel
- Convert two quaternions to velocity
- Multiply two quaternions
- Convert a quaternion to velocity
- Reset the model
- Resets the site position
- Generate a sequence of results onscreen
- Generate a frame
- Renders the result
- Get environment object
trajopt Key Features
trajopt Examples and Code Snippets
Community Discussions
Trending Discussions on trajopt
QUESTION
I'm trying to port trajectory optimization code originally written for TrajOpt into Drake. One of the nice things about TrajOpt is that it could solve SQP trajectory optimization problems with a constraint enforcing a minimum distance between the robot and surrounding obstacles, and it supported a pretty broad range of geometries (all the standard convex primitives plus simple convex meshes). For a number of reasons, TrajOpt is no longer the right choice for my project, so I'm porting my trajectory optimization code over to Drake. I think MinimumDistanceConstraint
is what I want to replicate this functionality, but it seems that Drake allows AutoDiffXd
signed distance queries only for spheres and half-spaces, not for more general convex shapes (like boxes or cylinders).
All of my other constraints support AutoDiff (I have some custom constraints for "probability of collision," but those provide an analytical derivative that can be used in an AutoDiff). In order to add a MinimumDistanceConstraint
that supports more general geometry, would I have to formulate the MathematicalProgram
entirely with doubles? Would that slow down the performance of the solver (e.g. by having to do finite differences instead of using the gradient information in AutoDiffXd
)?
In an ideal world, I'd like to avoid resorting to "bubble-wrapping" my robot and environment (replacing all the collision geometry with spheres), since the runtime of the custom constraints I'm using scales with the number of collide-able pairs in the scene (I'm currently using convex geometry to keep this number relatively low).
Any help would be appreciated!
...ANSWER
Answered 2020-May-22 at 14:51but it seems that Drake allows AutoDiffXd signed distance queries only for spheres and half-spaces, not for more general convex shapes (like boxes or cylinders)
- I think
MinimumDistanceConstraint
can handle more general geometries (including boxes and cylinders) forMultibodyPlant
andSceneGraph
. It calls FCL to compute the signed distance between these geometries (including witness points). It is true that these signed distance queries don't support AutodiffXd yet, but only double type. But as you will see later, you don't need the signed distance query with AutoDiffXd to compute the gradient of the distance. - You could try to construct MinimumDistanceConstraint for a
MultibodyPlant
with this API. Although you useMultibodyPlant
notMultibodyPlant
,MinimumDistanceConstraint
can still evaluate with AutodiffXd. Specifically, it computes the gradient of the signed distance here. To compute the gradient of the signed distance query, the signed distance query doesn't need to support AutoDiffXd. We can compute the gradient using the witness points and the normal vectors as
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install trajopt
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page