I am solving a problem in PyDrake with SNOPT and I get solutions that look reasonable, but when I do result.is_success() it comes back with False, so I am hoping to investigate why it thinks the problem wasn’t solved. I assume I have a bad constraint somewhere, so I’m doing this with the following code: ..
I am using the AddVisualizationCallback functionality for pydrake MathematicalProgram objects to try and make a progress bar that I can update while the solver is running, so that I can see how my solver is doing without having to look at the overly verbose output coming from SNOPT (which BTW I haven’t been able to ..
I am working with an example in pydrake that has a constraint with polar coordinates that includes evaluating the following function: def f(x): r = np.sqrt(x**2 + x**2) theta = np.arctan(x / x) return np.array([r, theta]) However, it chokes on the np.arctan call with this error: TypeError: loop of ufunc does not support argument 0 ..
I apparently have a complicated enough constraint function that it takes over 1 minute just to call prog.AddConstraint(), presumably because it’s spending a long time constructing the symbolic function (although if you have other insights why it takes so long I would appreciate it). What I would like to do is pull out the symbolic ..
I am trying to simulate a simple bar-link robot with a contracting actuator with a non-linear force strain curve (force decreases roughly exponentially as the strain of the actuator increases). I have created the sdf of the robot with a prismatic joint in place of the actuator. The issue I have is that I need ..
I am having fun with pydrake for the region of attraction (RoA) analysis. There is one type of non-linear system involving trigonometry that got me stuck. A similar problem has been posted here. As Russ points out in that post, there are 2 solutions: 1) shifting to another state-space; 2) using Taylor expansion. I am ..
Newer Drake user here. We’re setting up a ping pong playing iiwa, but we’re getting the following error when the ball and paddle come in contact. IndexError Traceback (most recent call last) /tmp/ipykernel_3391/3824908623.py in <module> 94 95 # simulator.AdvanceTo(0.9) # works —> 96 simulator.AdvanceTo(1.0) # fails when the ball and paddle come in contact IndexError: ..
I’m currently working on a trajectory optimization problem that involves binary actuators. In order to avoid solving an MINLP I do not simply optimize over the states and control inputs but instead, assume that each of the binary actuators alternates between the states "on" and "off" and optimize over the duration of those intervals. I ..
I’ve been reading through the Drake docs and any tutorials I found, but I’ve yet to see any detailed information about this problem/goal, so I thought I’d try to ask here. Goal: My current project is that I have a real-world furuta pendulum with sensors to obtain the cartpole equivalent of state vector q_sim = ..
I’m a student teaching myself Drake, specifically pydrake with Dr. Russ Tedrake’s excellent Underactuated Robotics course. I am trying to write a combined energy shaping and lqr controller for keeping a cartpole system balanced upright. I based the diagram on the cartpole example found in Chapter 3 of Underactuated Robotics [http://underactuated.mit.edu/acrobot.html], and the SwingUpAndBalanceController on ..