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

sdfからvrmlへの変換でエラー #50

Open
fkanehiro opened this issue Dec 9, 2015 · 7 comments
Open

sdfからvrmlへの変換でエラー #50

fkanehiro opened this issue Dec 9, 2015 · 7 comments

Comments

@fkanehiro
Copy link
Owner

チュートリアルの記載で生成された/tmp/pa10/model.sdfをvrmlに変換しようとすると、以下のエラーが発生します。

Traceback (most recent call last):
  File "/usr/local/bin/simtrans", line 9, in <module>
    load_entry_point('simtrans==408bb45', 'console_scripts', 'simtrans')()
  File "/usr/local/lib/python2.7/dist-packages/simtrans-408bb45-py2.7.egg/simtrans/cli.py", line 193, in main
    writer.write(m, options.tofile, options=options)
  File "/usr/local/lib/python2.7/dist-packages/simtrans-408bb45-py2.7.egg/simtrans/vrml.py", line 427, in write
    c.name = l.name + "-collision-" + str(uuid.uuid1()).replace('-', '')
NameError: global name 'uuid' is not defined
@fkanehiro
Copy link
Owner Author

uuidをimportしたら少し処理が進んだのですが、今度は以下のようなエラーが発生します。

Traceback (most recent call last):
  File "/usr/local/bin/simtrans", line 9, in <module>
    load_entry_point('simtrans==9d161b7-dirty', 'console_scripts', 'simtrans')()
  File "/usr/local/lib/python2.7/dist-packages/simtrans-9d161b7_dirty-py2.7.egg/simtrans/cli.py", line 193, in main
    writer.write(m, options.tofile, options=options)
  File "/usr/local/lib/python2.7/dist-packages/simtrans-9d161b7_dirty-py2.7.egg/simtrans/vrml.py", line 456, in write
    v.data.pretranslate()
  File "/usr/local/lib/python2.7/dist-packages/simtrans-9d161b7_dirty-py2.7.egg/simtrans/model.py", line 296, in pretranslate
    trans2 = numpy.dot(trans, self.getmatrix())
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

@fkanehiro
Copy link
Owner Author

self.getmatrix()の対角項にNaNが入っているようです。

@fkanehiro
Copy link
Owner Author

NaNじゃなくてNone

@fkanehiro
Copy link
Owner Author

collada.pyでunitmeterがNoneとなっていることが原因。
理由は分からないままに0.01にすると良さそうなのでとりあえずNoneの場合は0.01に設定。

@fkanehiro fkanehiro reopened this Dec 18, 2015
@fkanehiro
Copy link
Owner Author

と思ったら早速0.01ではダメな場合も発見。pa10では小さくなってしまう。

@fkanehiro
Copy link
Owner Author

wrl->urdfした時に生成されたdaeでunitmeterが指定されていないことが問題。

@fkanehiro
Copy link
Owner Author

0.01に設定しないと形状が大きくなってしまうJVRC-1も、Rvizでの表示は問題ない。どこかに情報は入っている?

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

1 participant