agent-system / lecture2019

lecture/homework agent-system 2019
4 stars 5 forks source link

aizuspider-initができない #21

Open dyson8910 opened 5 years ago

dyson8910 commented 5 years ago

解決したのですがIssueをたてさせていただきます. choreonoid上のaizuspiderをeuslispインターフェースから操作したいと思い,

$ ./run.sh roslaunch aizuspider_description aizuspider_task2.launch

でchoreonoidを立ち上げた状態で,

$ exec.sh
$ roscd aizuspider_description
$ roseus aizuspider-interface.l
roseus$ (aizuspider-init)

を行ったのですが,

E209-irteusgl$ Call Stack (max depth: 20):
  0: at (send action-client :pop-angle-vector-simulation)
  1: at (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))
  2: at (while #:dolist4064 (setq param (pop #:dolist4064)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i))))))))
  3: at (let ((param nil) (#:dolist4064 (send self controller-type))) nil (while #:dolist4064 (setq param (pop #:dolist4064)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))) nil)
  4: at (dolist (param (send self controller-type)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i))))))))
  5: at (let* ((joint-list (send robot :joint-list)) (all-joint-names (send-all joint-list :name))) (dolist (param (send self controller-type)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))) (send self :publish-joint-state) (if viewer (send self :draw-objects)))
  6: at (send #<aizuspider-interface #X68a10d8> :robot-interface-simulation-callback)
  7: at euserror
  8: at euserror
  9: at (send action-client :pop-angle-vector-simulation)
  10: at (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))
  11: at (while #:dolist4061 (setq param (pop #:dolist4061)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i))))))))
  12: at (let ((param nil) (#:dolist4061 (send self controller-type))) nil (while #:dolist4061 (setq param (pop #:dolist4061)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))) nil)
  13: at (dolist (param (send self controller-type)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i))))))))
  14: at (let* ((joint-list (send robot :joint-list)) (all-joint-names (send-all joint-list :name))) (dolist (param (send self controller-type)) (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))) (send self :publish-joint-state) (if viewer (send self :draw-objects)))
  15: at (send #<aizuspider-interface #X68a10d8> :robot-interface-simulation-callback)
  16: at euserror
  17: at euserror
  18: at (send action-client :pop-angle-vector-simulation)
  19: at (let* ((joint-names (cdr (assoc :joint-names param))) (action-name (cdr (assoc :controller-action param))) (action-client (find action-name controller-actions :key #'(lambda (x) (send x :name)) :test #'string=)) (av (send action-client :pop-angle-vector-simulation))) (when av (dolist (j joint-names) (if (find j all-joint-names :test #'string=) (let ((i (position j all-joint-names :test #'string=))) (send (elt joint-list i) :joint-angle (elt av i)))))))
  And more...
/opt/ros/kinetic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl 0 error: cannot find method :pop-angle-vector-simulation in (send action-client :pop-angle-vector-simulation)

というエラーがずっと出てしまいます. aizuspider-initでの:namespaceが "AizuSpider"となっているのに対して,choreonoidを立ち上げた際のtopicなどでは "AizuSpiderAA"となっているのが原因のようです.

$ exec.sh
$ roscd aizuspider_description
$ roseus aizuspider-interface.l
roseus$ (aizuspider-init :namespace "AizuSpiderAA")

としたところ,エラーも出ずにri,robotができており, (send ri :angle-vector (send robot :angle-vector) 5000) などができることが確認しました.