drake | drake ‒ a password management utility | Generator Utils library
kandi X-RAY | drake Summary
kandi X-RAY | drake Summary
generated on any computer. All you need to remember is a single master password, which you will use for every website; and something that identifies the account, such as the website itself or an email address. Execute drake to generate a password or drake -h for a full list of options. Head over to the [documentation page] for more details.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Perform setup
- Authenticate using sudo
- Authenticate user
drake Key Features
drake Examples and Code Snippets
Community Discussions
Trending Discussions on drake
QUESTION
I have a table which stores student admission details and the admission date. Admission Date is bifurcated into multiple rows and I would like to combine the values from the three rows into a single row.
...ANSWER
Answered 2021-Jun-15 at 15:43You can use conditional window functions:
QUESTION
I am trying to get the Coriolis matrix for my robot (need the matrix explicitly for the controller) based on the following approach which I have found online:
...ANSWER
Answered 2021-Jun-15 at 14:00You are close. You need to tell the autodiff pipeline what you want to take the derivative with respect to. In this case, I believe you want
QUESTION
Basically there are rectangles (buildings) and circles (people).
The task I need to do is basically, when a function "fg" is called, every circle that is inside a given radius needs to run to the closest rectangle, and after all the circles inside the radius finds a rectangle, I need to report on a .txt file the names of the circles that run to each rectangle sorted alphabetically.
Such as:
Rectangle A: c1 c2 c3
Rectangle B: c7 c11 c20
...
And so on...
I need to store the addresses of the circles that run, on a vector of each rectangle. I tried to use qsort from stdlib.h, but maybe the function that i use to compare is wrong
(EDIT - full code to better understand):
...ANSWER
Answered 2021-Jun-15 at 02:51The third parameter needs to be the size of the actual array elements:
QUESTION
I am working on recovering from collision. I have the names of bodies in collision and the frames associated with them and now I want to move the body/frame that is closer to the end effector to get out of collision, but I couldn't find a straightforward way to get this information from a MultiBodyPlant
. I could construct another representation of the graph and search through it, but I was wondering if it is possible to maybe get this from drake
instead?
ANSWER
Answered 2021-Jun-14 at 16:07Wow. I think you're right that we don't make this one easy (but we should).
For now, I would think you can call MultibodyPlant::GetJointIndices()
and then loop the joints via MultibodyPlant::get_joint()
to find the joint Joint::child_body() == collision_body
, and then use Joint::parent_body()
. And we can open an issue if avoiding that (small?) linear search becomes important?
QUESTION
I see the current chapter of Underactuated: System Identification and the corresponding notebook, and it currently does it through symbolics.
I'd like to try out stuff like system identification using forward-mode automatic differentiation ("autodiff" via AutoDiffXd
, etc.), just to check things like scalability, get a better feel for symbolics and autodiff options in Drake, etc.
As a first steps towards system identification with autodiff, how do I take gradients of MultibodyPlant
quantities (e.g. generalized forces, forward dynamics, etc.) with respect to inertial parameters (say mass)?
- Note: Permalinks of Underactuated chapter + notebook at time of writing: sysid.html, sysid.ipynb
ANSWER
Answered 2021-Jun-09 at 12:41Drake's formulation of MultibodyPlant
, in conjunction with the Drake Systems framework, can allow you to take derivatives (via autodiff) with respect to inertial parameters by using the parameter accessors of RigidBody
on the given plant's Context
.
Please see the following tutorial:
https://nbviewer.jupyter.org/github/RobotLocomotion/drake/blob/nightly-release/tutorials/multibody_plant_autodiff_mass.ipynb
QUESTION
I have been trying to get a linearized version of a MultiBodyPlant without gravity to experiment with LQR for systems without gravity. However, the linearization leads to some interesting phenomena. A simplified example can be found in this google colab notebook.
When I linearize and check the rank of the controllability matrix for a single free-floating rigid body, I get a rank of 6. This is expected as I use the get_applied_generalized_force_input_port()
as the input port, hence making sure that all possible forces can be applied to the system. The system of a single rigid body has 6 degrees of freedom (DoF) and the rank of the controllability matrix is 6, hence it is controllable.
However, when I use Drake's in-built function IsControllable()
to check the controllability, it results False
meaning that it thinks the system is not controllable. In the source of the IsControllable()
function, the rank of the matrix is checked against the number of rows in the A
matrix. I think that this might be causing an issue as the linearization involves the use of quaternions during the AutoDiff (thus adding one more row to the A
matrix due to 4 numbers being used for quaternions to represent the state). The linearization process does not know about the unit-quaternion constraint, and hence the A
matrix for a system using quaternions will have 1 more row than the DoF of the system.
I wonder if this is the correct intuition for the controllability mismatch?
And could this cause issues as other functions within Drake that maybe use the IsControllable()
function for verifying controllability?
ANSWER
Answered 2021-May-30 at 00:38I think IsControllable()
is doing the right thing. If you have a single body with a floating base, then you have 13 state variables (7 positions, 6 velocities). If you were to simply linearize the equations, then you are right that the resulting linear system would not know about the unit quaternion constraint. Asking for controllability of this system would be asking you to drive the system to the origin (quaternion => 0 ~= unit quaternion). Since your dynamics model cannot achieve that, even in the linearization, I expect your system is not controllable in that linearization.
You could replace the quaternion floating base with a roll-pitch-yaw floating base. We have some API that will make that easier coming in https://github.com/RobotLocomotion/drake/issues/14949 . But in the mean time, you can add the three translations and a BallRpyJoint.
The alternative to look into the literature on control in SE(3) directly using quaternions. There are elegant results there, but linear analysis won’t help.
QUESTION
Consider the following data.frame:
...ANSWER
Answered 2021-May-13 at 09:38Answer
Use grepl to find strings that [1] do not contain a space, and [2] are present in other names.
Code
QUESTION
How do I visualize different coordinate frames in drake when using the LCM visualizer, such as the body frame attached to the end effector of the Kuka?
...ANSWER
Answered 2021-May-08 at 13:41Here's some simple code for drawing frames in Drake Visualizer, w/ simple video:
https://github.com/EricCousineau-TRI/repro/blob/ea2d7987/drake_stuff/drake_viz_draw_frames/README.md
Does this help at all? If so, yeah, I can help to PR against Drake.
Some notes / caveats:
- This doesn't draw
pydrake.geometry.FrameId
as doesmeshcat
; instead, it simply draws a frame (whatever you name it) usingRigidTransform
, w.r.t. world frame. - This is unlike things like
/tf
in ROS, where you can publish a frame w.r.t. another frame.
QUESTION
I am learning how to use Drake to solving optimization problems. This problem was to find the optimal length and width of a fence, the fence must have a perimeter less than or equal to 40. The code below only works when the perimeter constraint is an equality constraint. It should work as an inequality constraint, but my optimal solution results in x=[nan nan]. Does anyone know why this is the case?
...ANSWER
Answered 2021-May-05 at 01:12I get [nan, nan] for both inequality constraint and equality constraint.
As Russ mentioned, the problem is the cost being non-convex, and Drake incurred the wrong solver. For the moment, I would suggest to explicitly designate a solver. You could do
QUESTION
I'm new to MIT Drake
, I was using CasADi (ipopt)
for a mecanum wheeled model for MPC
.
In CasADi
, I can create a symbolic variable for the optimization parameters (i.e., initial state and target state).
Then use it to compute the error in state, how can I get an equivalent functionality in Drake
?
ANSWER
Answered 2021-Apr-10 at 15:52I've definitely seen mechanum wheels work in drake, but doing trajectory optimization for them requires some thought. For most every wheeled robot trajectory optimization, you want to use a minimal coordinates model. I discuss that briefly in the ballbot example in the notebook associated with http://underactuated.csail.mit.edu/acrobot.html
And for formulating your MPC, I would recommend the notes in http://underactuated.csail.mit.edu/trajopt.html
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install drake
You can use drake like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
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