close
The Wayback Machine - https://web.archive.org/web/20201007012322/https://github.com/bulletphysics/bullet3/issues/3013
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

Modelling Compression Spring #3013

Open
nyxaria opened this issue Aug 27, 2020 · 0 comments
Open

Modelling Compression Spring #3013

nyxaria opened this issue Aug 27, 2020 · 0 comments

Comments

@nyxaria
Copy link

@nyxaria nyxaria commented Aug 27, 2020

Hello, I am currently trying to set up a Series Elastic Actuator, which can exert a small force (~20N) in both directions, and has a compression spring with stiffness of k=2144.3N/m

I have set up a prismatic joint in my URDF, but am unsure how to configure it now in PyBullet.

This is what I have:

controller = Controller()

    cli = p.connect(p.GUI)  # or p.DIRECT for non-graphical version

    p.setAdditionalSearchPath(pybullet_data.getDataPath())
    p.setGravity(0, 0, -9.812)
    plane = p.loadURDF("plane.urdf")

    robot_start_pos = [0, 0, 1]
    robot_start_orientation = p.getQuaternionFromEuler([0, 0, 0])
    robot = p.loadURDF("robot.urdf", robot_start_pos, robot_start_orientation, flags=p.URDF_USE_INERTIA_FROM_FILE)

    steps_per_second = 70
    print("Total number of joints:", p.getNumJoints(robot))
    controllable_joints = []
    for index in range(p.getNumJoints(robot)):
        info = p.getJointInfo(robot, index)
        if info[2] != p.JOINT_FIXED:  # we are looking for joints we can control
            joint = Joint(info[0], info[1], info[2], info[6], info[7], info[8], info[9], info[10], info[11])
            controllable_joints.append(joint)
        if info[2] == p.JOINT_PRISMATIC:
            set_joint_to_series_elastic_actuator()
    print("Controllable Joints:")
    pp.pprint(controllable_joints)
     
# step code omited

How would I go about implementing set_joint_to_series_elastic_actuator()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.