Unverified Commit 888ae833 authored by Carlos Mastalli's avatar Carlos Mastalli Committed by GitHub
Browse files

Merge pull request #1040 from cmastalli/topic/fix-arm-example

Upgraded the arm_example code
parents 5f627564 d825d184
Pipeline #17421 passed with stage
in 32 minutes and 31 seconds
......@@ -18,9 +18,10 @@ robot.viewer.gui.refresh()
# Create the cost functions
state = crocoddyl.StateMultibody(robot.model)
goalTrackingCost = crocoddyl.CostModelFrameTranslation(state, robot_model.getFrameId("gripper_left_joint"), target)
xRegCost = crocoddyl.CostModelState(state)
uRegCost = crocoddyl.CostModelControl(state)
goalResidual = crocoddyl.ResidualModelFrameTranslation(state, robot_model.getFrameId("gripper_left_joint"), target)
goalTrackingCost = crocoddyl.CostModelResidual(state, goalResidual)
xRegCost = crocoddyl.CostModelResidual(state, crocoddyl.ResidualModelState(state))
uRegCost = crocoddyl.CostModelResidual(state, crocoddyl.ResidualModelControl(state))
# Create cost model per each action model
runningCostModel = crocoddyl.CostModelSum(state)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment