File: test_skeleton.py

package info (click to toggle)
dart 6.12.1%2Bdfsg4-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 57,000 kB
  • sloc: cpp: 269,461; python: 3,911; xml: 1,273; sh: 404; makefile: 30
file content (22 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import platform
import pytest
import numpy as np
import dartpy as dart


def test_basic():
    skel = dart.dynamics.Skeleton()

    joint_prop = dart.dynamics.FreeJointProperties()
    joint_prop.mName = 'joint0'
    assert joint_prop.mName == 'joint0'

    [joint1, body1] = skel.createFreeJointAndBodyNodePair(None, joint_prop)
    assert joint1.getType() == 'FreeJoint'
    assert joint1.getName() == 'joint0'

    assert skel.getBodyNodes()[0].getName() == body1.getName()


if __name__ == "__main__":
    pytest.main()