Questions tagged [drake]

Drake is an open-source toolbox for planning, control, and analysis of nonlinear systems, developed in C++ with bindings available in Python.

Drake is an open-source toolbox for planning, control, and analysis of nonlinear systems, developed in C++ with bindings available in Python.

Resources

692 questions
2
votes
1 answer

Get mapping from body state to plant state indices?

Is there a way to know the mapping between the indices of a plant's state [q, v] and an individual object's [qi, vi]? Example: if I have object-wise representations of position, velocities, or accelerations (e.g. q_obj1, q_obj2 etc.) and need to…
Joao Loula
  • 91
  • 4
2
votes
1 answer

can we cache equations in symbolic form and plug in numbers during trajectory optimization?

Is this possible to precompute the jacobians, mass matrix symbolically and only evaluate them in the optimization process? e.g., we can cache M = plant.CalcMassMatrixViaInverseDynamics(context) as a symbolic matrix. When adding constraints, just…
Shinnnn
  • 99
  • 5
2
votes
1 answer

How to save a class object with a Drake plant object inside?

pickle.dump(pendulum, open("obj/pendulum1.obj", "wb")) returns TypeError: cannot pickle 'pydrake.examples.pendulum.PendulumPlant' object. Here, pendulum is an object of a self-defined class with an PendulumPlant object inside. Is it because pydrake…
Yukun Xia
  • 65
  • 7
2
votes
2 answers

PyDrake ComputePointPairPenetration() kills kernel

In calling ComputePointPairPenetration() from a QueryObject in Drake in Python in a Jupyter Notebook environment, ComputePointPairPenetration() reliably kills the kernel. I'm not sure what's causing it and couldn't figure out how to get any error…
zliu
  • 143
  • 6
2
votes
1 answer

Is it possible to get full symbolic eqn of motion?

It seems that we have to plug the numeric values into context and get the corresponding equation of motion. Is it possible to plug in symbolic values and get EoM with e.g., q1, q2? context = plant.CreateDefaultContext() plant.SetPositions(context,…
Shinnnn
  • 99
  • 5
2
votes
1 answer

What's the meaning of the index of the input port?

In MIT6.832 HW2 "Cart-Pole: Linearization and LQR Balncing", the carpole is defined as: # instantiate the cart-pole and the scene graph cartpole, scene_graph = AddMultibodyPlantSceneGraph(builder, time_step=0.0) urdf_path =…
Yukun Xia
  • 65
  • 7
2
votes
2 answers

Is it possible to support Python binding for AddJoint that takes X_PF, X_BM as arguments?

I am trying to translate make_acrobot_plant.cc to Python. To add the elbow joint, I need to pass in the X_PF and X_BM into AddJoint (as in here). This is supported in the C++ interface as in JointType. But the current Python binding only supports…
Shinnnn
  • 99
  • 5
2
votes
3 answers

Homebrew Bundle failed! Error: Cask 'font-dejavu' is not installed

FYI -- Running drake/setup/mac/install_prereqs.sh this morning resulted in Using robotlocomotion/director ==> Downloading https://downloads.sourceforge.net/dejavu/dejavu-fonts-ttf-2.37.zip Already downloaded:…
Russ Tedrake
  • 4,703
  • 1
  • 7
  • 10
2
votes
2 answers

Adding forces to body post-finalize?

I'm setting up a simple simulation where I want a body (a box) to fall in a gravity field for half a second and then rise up due to a force I apply on it which overcomes gravity. I've tried implementing this force using three methods, using…
2
votes
2 answers

How to make sense of the continuous state vector?

Background I am trying to balance a mobile inverted pendulum (i.e. segway). For the simulation, I created a simple robot that involves a pole attached to a cylinder (wheel) through a revolute joint. Question After constructing my MIP plant,…
Rufus
  • 5,111
  • 4
  • 28
  • 45
2
votes
1 answer

How to change floating base type of model loaded from urdf file using pydrake?

I am trying to load model from urdf file. I can achieve this via RigidBodyTree class: rbtree = RigidBodyTree(file_name, floating_base_type) Unfortunately, as it said at pydrake.attic reference page, it will be deprecated soon. I tried to add model…
asQue
  • 49
  • 5
1
vote
1 answer

AttributeError: 'pydrake.geometry.Meshcat' object has no attribute 'SetCameraPose'

I am getting this AttributeError: 'pydrake.geometry.Meshcat' object has no attribute 'SetCameraPose' when trying to set the camera in a Meshcat viz. Really scratching my head on this one, as I can reproduce the error with just: from pydrake.geometry…
1
vote
1 answer

How do I visualize coordinate frames in Drake using Meshcat?

How can I view coordinate frames from Drake in Meschcat? I only found this related question about Drake Visualizer but had trouble finding the equivalent code for Meshcat. I have made some progress and got a coordinate frame at the origin using …
Mark
  • 5,286
  • 5
  • 42
  • 73
1
vote
1 answer

Control a part of the MultibodyPlant

I wang to use LQR to control a quadrotor in the MultibodyPlant, but I dont know how to control a part of the MultibodyPlant. For example, the MakeMultipleQuadrotors() includes a sdf model which has a quadrotor and a payload. I just want to control…
Howard Li
  • 11
  • 2
1
vote
1 answer

Rigid-Body Added Mass Matrix (6x6)

In underwater robotics, we model the inertia of the surrounding fluid using an added mass matrix. The added mass matrix has different masses in different directions, and also contains nonzero off-diagonals: M_A = [ m11 m12 m13 m14 m15 m16 m21 m22…
Tom Slawik
  • 11
  • 1