Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement create_tsid utility function for the python bindings #433

Merged
merged 5 commits into from
Nov 2, 2021

Conversation

GiulioRomualdi
Copy link
Member

This PR introduces the create_tsid method for the python bindings. The method can be used to easily create a tsid problem by just reading a configuration file.
For instance the following configuration file

tasks = ["COM_TASK", "LF_TASK"]
[TSID]
robot_acceleration_variable_name = "robot_acceleration"
joint_torques_variable_name = "joint_torques"
contact_wrench_variables_name = ["lf_wrench", "rf_wrench"]

[VARIABLES]
variables_name = ["robot_acceleration", "joint_torques", "lf_wrench", "rf_wrench"]
variables_size = [29, 23, 6, 6]
# the following parameter is optional and it can be used to give a name to each element of a specific variable
lf_wrench_elements_name = ["fx", "fy", "fz", "tx", "ty", "tz"]

[COM_TASK]
name = "com"
type = "CoMTask"
priority = 1
weight = [10.0, 10.0, 10.0]
# The following parameters are required by the specific task
robot_acceleration_variable_name = "robot_acceleration"
kp_linear = 10.0
kd_linear = 2.0

[LF_TASK]
name = "left_foot"
type = "SE3Task"
priority = 0
# The following parameters are required by the specific task
robot_acceleration_variable_name = "robot_acceleration"
frame_name = "left_sole_link"
kp_linear = 10.0
kd_linear = 2.0
kp_angular = 10.0
kd_angular = 2.0

can be used to create a tsid problem with two tasks, namely a com and a se3 tasks

The function will return a tuple containing the solver, the dictionary of the tasks, and the variables handler

@GiulioRomualdi GiulioRomualdi merged commit 25dcd7d into master Nov 2, 2021
@GiulioRomualdi GiulioRomualdi deleted the python/utils branch November 2, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants