-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add eusbullet for using bullet collision function (implement with c defun) #555
Conversation
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
New manual of collision function: https://431-17358571-gh.circle-artifacts.com/0/home/circleci/project/artifacts/rst/html/irtcollision.html |
irteus/irtcollision.l
Outdated
|
||
(defun collision-check | ||
(model1 model2 &rest args &key &allow-other-keys) | ||
"Check collision between model1 and model2 using Bullet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using Bullet
should be removed.
Please consider mmurooka#2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, merged.
(send *sarm* :joint0 :joint-angle -1 :relative t) | ||
(send *irtviewer* :draw-objects)) | ||
\end{verbatim} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This demo does not work, and pqp-collision-check-objects
is PQP specific.
Please consider mmurooka#3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, merged. Checked that demo works.
;; move object | ||
(incf cnt) | ||
(send obj1 :newcoords (make-coords :pos (float-vector (* 500.0 (sin (/ cnt 20.0))) 50 0))) | ||
(send *irtviewer* :draw-objects) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the visualization, lines are flickering heavily and hard to see.
Please consider mmurooka#4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, merged.
8b0a420
to
b265bc9
Compare
@Naoki-Hiraoka thank you for your review. I merged your PR and rebased commits. |
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
irteus/bullet.l
Outdated
|
||
(defmethod cascaded-coords | ||
(:make-btmodel | ||
(&key (fat 0) vs m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguments vs
and m
are local variables.
Please consider mmurooka#5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, merged.
irteus/bullet.l
Outdated
(export '(bt-collision-distance bt-collision-check)) | ||
|
||
(defun bt-make-model-from-body | ||
(b &key (csg (send b :csg)) (margin nil) m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m
is local variable.
Please consider mmurooka#6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, merged.
5db6479
to
6cb08aa
Compare
@Naoki-Hiraoka thank you again for your review. I merged your PR and rebased commits. |
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
btVector3 m_pointOnA; | ||
btVector3 m_pointOnB; | ||
btVector3 m_normalBtoA; | ||
btScalar m_distance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bullet_User_Manual.pdf によれば,btScalar
型はデフォルトではfloat
になっており,コンパイル時にBT_USE_DOUBLE_PRECISION
をONにするとdouble
になるそうです.このオプションを付けなくても十分に機能していますので必須ではありませんが,64bitマシンの場合にはこのオプションをつけてコンパイルした方が正確になりそうです.
|
||
long BT_MakeMeshModel(double *verticesPoints, long numVertices) | ||
{ | ||
btConvexHullShape* pshape = new btConvexHullShape(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よく使用されるロボットモデルで簡単に試した限りでは,現在の実装でも安定性・計算時間ともにpqpと同程度には問題無く機能しているので必須ではありませんが,
Bullet_User_Manual.pdfによれば,パフォーマンスや安定性のためには
Use less then 100 vertices in a convex mesh
とするのが良く,btShapeHull utility
を用いてconvex hullを単純化するべきだそうです.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MakeFileは私の知識不足により確認できませんでした.
Review approved. @k-okada Please tell if more refine necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add one more comment
@@ -51,6 +51,7 @@ for test_l in irteus/test/*.l; do | |||
|
|||
# osrf/ubuntu_arm64:trusty takes >50 min, skip irteus-demo.l | |||
[[ "$DOCKER_IMAGE" == *"arm64:trusty"* && $test_l =~ irteus-demo.l ]] && continue; | |||
[[ ( "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ) && $test_l =~ test-collision.l ]] && continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add comment why we have to skip this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comment: 1f4da2f#diff-b4553af39acae935d505c76e139d4aa3R54-R55
(rebase commit into previous)
6cb08aa
to
0b8c0e2
Compare
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
@mmurooka all test in EusLisp failing, is this related to this change ? https://travis-ci.org/euslisp/EusLisp/builds/604932545 |
it seems so... I'll check. One of the problem is that, in all test cases, jskeus is compiled without bullet.
|
reimplement #538 according to advice of #538 (comment).
Defference with previous PR is this PR uses C defun and does not use defforeign.
Correspondence between PQP and new Bullet is:
pqp.l <-> bullet.l
euspqp.c <-> eusbullet.c
CPQP.C <-> CBULLET.cpp
PQP (directory) <-> None (bullet is installed by apt)