Relative Content

Tag Archive for drake

How to use generalized_contact_forces in Drake MultibodyPlant

Drake’s MultibodyPlant has an output port for generalized_contact_forces. I want to use this port to see what contact forces are being applied to the gripper of my robot. However, the documentation does not mention what type of data is being sent through this port. Are there some resources that explain what a generalized contact force is, and how to consume the data coming from this port?

How do I get specific results from the GraphOfConvexSets class in Drake?

I am using Drake’s GraphOfConvexSets Class to solve the shortest path problem through a graph of convex sets. I have manually built my own graph and have used the class reference to solve a simple A*-type problem from drake::geometry::optimization::GraphOfConvexSets::SolveShortestPath and using that result to get drake::geometry::optimization::GraphOfConvexSets::SolveShortestPath::GetSolutionPath (which is a list of edges that are either 1 or 0 for active or inactive). Note the picture below
enter image description here
I have made about 9 nodes that each have four boundary points in them. Each node is a convex set. I defined them as polygons and then added as a vertex to the graph. I also added the edges between the vertices.

Quadrotor simulation with MPC controller get stuck in Drake

I first built a mass in SDF and a prismatic joint with and on the bottom, then I built it into a quadcopter using the propeller module in Drake. In order to control the drone to reach the target point, I used linear MPC to build the control system. Additionally, I followed other answer and set the controller’s output variable to a discrete variable and added a zero-order hold between the controller and the drone model. The solve time of each MPC program is between 10-20ms, and the update interval of the controller output variables is 0.1 seconds.