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

Create and Run Multiple Solver Instances in Parallel

I'd like to run multiple solvers in multiple threads and eventually processes. I'm currently running a for-loop and creating threads like the following: for (...) { pthread_t pid; Args args; args.solver = solver??? …
alvin
  • 137
  • 7
2
votes
2 answers

pydrake: How do I identify slow Python LeafSystem's (to possibly rewrite in C++)?

I am prototyping a simple Drake simulation. I have some simple Python LeafSystems that implement controllers, and find that without these systems, my simulation can run at realtime; however, with these systems, my simulation runs much slower than…
Eric Cousineau
  • 1,944
  • 14
  • 23
2
votes
0 answers

Multiple GeometryId for the same collision or visual body

This is a follow-up of another similar issue. Only in my case, I am seeing >2 geometry ids not only for a link, but also its collision element. In the code below, I am printing out geometry id's that are valid collision pairs: #include…
alvin
  • 137
  • 7
2
votes
1 answer

Structure of MultibodyPlant, SceneGraph, Context, and Simulator for pydrake simulation

I'm getting very confused trying to setup my simulation correctly in PyDrake. What I want is to have an actuated robot (with e.g. an InverseDynamicsController on it) together with an object in the scene that the robot will manipulate. However, I'm…
adamconkey
  • 4,104
  • 5
  • 32
  • 61
2
votes
1 answer

Drake: Integrate Mass Matrix and Bias Term in Optimization Problem

I am trying to implement Non Linear MPC for a 7-DOF manipulator in drake. To do this, in my constraints, I need to have dynamic parameters like the Mass matrix M(q) and the bias term C(q,q_dot)*q_dot, but those depend on the decision variables q,…
2
votes
1 answer

Troubleshooting optimization for finding a robot pose in equilibrium

I am trying to write a program which given some cost and constraints finds a combination of states and torques which will result in a fixed point. The script can be found in this Colab. For a bit more background, I am trying to balance a humanoid…
2
votes
1 answer

What is the standard workflow for using drake with real robot?

I would like to use Drake to control a real robot (Franka panda or Kuka iiwa). For simulation, the standard workflow would be build a diagram first and then use the Simulator to simulate the diagram. However, for the usage in real robot, I haven't…
Chen Wang
  • 448
  • 2
  • 11
2
votes
1 answer

What kind of input does "actuation input port" refer to?

Recently I try to implement a "velocity-resolved" controller to a robotic manipulator in drake simulation.In detail, given a desired velocity v_d in task space, we calculate the joints' velocity q_dot via v_d = J * q_dot. Hence I want to directly…
Haoyun
  • 23
  • 3
2
votes
1 answer

How to use callback functions of Gurobi in Drake

I am solving hybrid control problems using Drake with Gurobi solver. I want to get the final root relaxed solution (after presolve and auto cut generation). I tried writing log files, but the log file doesn't print out every iteration and I couldn't…
Jisun Lee
  • 21
  • 1
2
votes
1 answer

Can I use an SDF as a plant for DirectCollocation?

My goal is to use an SDF I made that models a cart-pole system and use DirectCollocation to find a swing-up trajectory. However, when I try to use the plant created by the SDF and use DirectCollocation to construct the mathematical program I get the…
jeh15
  • 37
  • 4
2
votes
2 answers

How to run a custom Slider

I'm working on a simulation of a Soft Robot using the Piecewise Constant Curvature (PCC) assumption and representing each PCC segment with an Augmented Rigid Body Model (ARBM). For this I first would like to implement a manual slider for curvature…
antbre
  • 63
  • 6
2
votes
1 answer

Difference between example Acrobot plant A matrix and standard form

In section 3.4.1 of the Underactuated Robotics notes (https://underactuated.mit.edu/acrobot.html#section4), the manipulator equations are linearized around a fixed point and the matrix A_lin is derived. While verifying the linearization of my own…
2
votes
2 answers

Pydrake: how to get a single sine wave out of sine.get_output_port(0).Eval(sine_context)? (currently generates 3 waves)

| drake 0.38.0 | python 3.7 | OS: ubuntu 20.04 | pycharm | I want to use a sine wave (amplitude: 0.01, f: 2) as the joint torque input for the base of a kuka iiwa simulated robot. (i.e. I just want to see the base swivel back and forth to test some…
L Wall
  • 65
  • 4
2
votes
2 answers

Is there a way to detect if two bodies/frames are fixed in Drake?

Does anybody know of an easy way to determine if two bodies (or frames) are fixed with respect to one another in Pydrake? Thank you!
nanogru
  • 23
  • 2
  • 10
2
votes
2 answers

`plant.CalcInverseDynamics` doesn't consider the gravity of the links

I am trying to calculate the result of the inverse dynamic for a plant, however, I have noticed that the returned vector doesn't consider the gravity of the links. For example, for a simple 1 link robot with a mass of 2 Kg that is positioned at the…
Amin Ya
  • 1,515
  • 1
  • 19
  • 30