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

How do you declare an abstract port on a MultiBodyPlant

I would like to do declare an AbstractOutputPort is so I can use calculations from the abstract port in my controller. Am I thinking of MultiBodyPlants wrong and should I define create my own LeafSystem void outputGeometryPose( const…
cjds
  • 8,268
  • 10
  • 49
  • 84
2
votes
1 answer

How to change the damping coefficient of a RevoluteJoint in Drake

How can we change the damping coefficient of RevoluteJoint after calling parser.AddModelFromFile(urdf_file_name)? I believe damping_ is the variable that I need to change, but there is not setter for this variable:…
Eric
  • 21
  • 2
2
votes
1 answer

Extra body with nans in Context of a MultiBodyPlant causing Error While Simulation

After importing an urdf file and creating a MultiBodyPlant I see an extra parameter group with nans when I print the context. The full printed context can be seen here. The parameter group which I cannot explain/understand is this one: 18 numeric…
Shubham Vyas
  • 163
  • 10
2
votes
1 answer

What is the recommended way to find the (position/velocity) indices of a free body in the `MultibodyPlant` state vector?

There are a number of use cases where we want to introspect the state vector coming out of the MultibodyPlant get_state_output_port. As a simple example, imagine I am logging the state output port and just want to label my axes (or know which axes…
Russ Tedrake
  • 4,703
  • 1
  • 7
  • 10
2
votes
2 answers

Nonlinear (non-polynomial) cost function with DirectCollocation in Drake

I am trying to formulate a trajectory optimization problem for a glider, where I want to maximize the average horisontal velocity. I have formulated the system as a drakesystem, and the state vector consists of the position and velocity. Currently,…
bernhardpg
  • 61
  • 5
2
votes
1 answer

Building python bindings - linking of rule failed

When I try to run make -j from https://drake.mit.edu/python_bindings.html#python-bindings-binary, I get this error: # make -j [ 12%] Performing build step for 'drake_cxx_python' INFO: Analyzed target //:install (1 packages loaded, 3 targets…
dxy
  • 21
  • 1
2
votes
1 answer

Double pendulum with a single PID

I'm trying to understand how to use Drake to control a simple Double Pendulum using a PID controller. Following the example at this link, I created a similar program but I only wanted to try to use 1 PID on the lower joint and see what the system…
cjds
  • 8,268
  • 10
  • 49
  • 84
2
votes
2 answers

What is the recommended way of constraining floating base quaternion position and angular velocity?

For objects with floating base, rotation in the generalized position is expressed as a 4D quaternion. However, the rotation in the generalized velocity is still expressed as a 3D spatial rotation vector. Is there a recommended way of constraining…
Rufus
  • 5,111
  • 4
  • 28
  • 45
2
votes
2 answers

Approach for Linearizing Nonlinear System around Decision Variables (x, u) from MathematicalProgram at each discrete point in time

This is a follow up question on the same system from the following post (for additional context). I describe a nonlinear system as a LeafSystem_[T] (using templates) with two input ports and one output port. Then, I essentially would like to perform…
Phil
  • 47
  • 4
2
votes
1 answer

Direct Transcription of nonlinear system with cost function dependent on K matrices returned by time-varying LQR

I'm working on implementing a trajectory optimization algorithm named DIRTREL, which is essentially direct transcription with an added cost function. However, the cost function incorporates the K matrices obtained by linearizing the system around…
Phil
  • 47
  • 4
2
votes
1 answer

Why is loading my SDF causing Mobilizer creating a closed loop error

I'm trying to load an SDF into drake but my program throws a std::runtime_error terminate called after throwing an instance of 'std::runtime_error' what(): This mobilizer is creating a closed loop since the outboard body already has an inboard…
cjds
  • 8,268
  • 10
  • 49
  • 84
2
votes
1 answer

View collision models in Drake

Is there any way to view the collision models with Drake Visualizer without simply copying the model in the visual tag? I was trying to use a mesh as a collision model and I am unable to get collisions working with it.
Alex Tacescu
  • 153
  • 6
2
votes
2 answers

Problems with drake build and "from pydrake.all import"

I'm having problems with using from pydrake.all import (MathematicalProgram, Polynomial) after building drake from source (reference https://drake.mit.edu/python_bindings.html). Per the previous link, installation steps were: git clone…
Micah
  • 33
  • 5
2
votes
2 answers

robot passing through the floor in drake

I have a simple differential drive robot model. When I start the simulation in drake, it passes through the floor and does not stay on the floor. My URDF file do have collisions defined for each link. However, it seems not to obey it when running…
Murt
  • 83
  • 5
2
votes
0 answers

Computing the normal cdf with custom pydrake types?

I'm writing a MathematicalProgram that requires evaluating the likelihood of sampling a normal distribution and getting a value close to a certain number. Ideally, I would want to write something like this, which uses the scipy.stats norm…
Joao Loula
  • 91
  • 4