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

Error in running main.py #1

Open
s-nam opened this issue Apr 18, 2023 · 1 comment
Open

Error in running main.py #1

s-nam opened this issue Apr 18, 2023 · 1 comment

Comments

@s-nam
Copy link

s-nam commented Apr 18, 2023

Traceback (most recent call last):
  File "${home}/rfem/main.py", line 41, in <module>
    visualize_elastic_pendulum(q, dt, n_replays=10, urdf_path=robot.urdf_path)
  File "${home}/rfem/visualization.py", line 38, in visualize_elastic_pendulum
    viz.play(q[1:, :].T, dt)
  File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/visualize/base_visualizer.py", line 150, in play
    self.display(q_trajectory[i])
  File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/visualize/panda3d_visualizer.py", line 94, in display
    pin.forwardKinematics(self.model, self.data, q)
ValueError: wrong argument size: expected 4, got 501
hint: The configuration vector is not of right size

Any idea?

@shamilmamedov
Copy link
Owner

visualizer expects the joint configuration trajectory q to be of dimension [n_q x traj_length]; try to transpose q

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

No branches or pull requests

2 participants