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

Subway demo #1276

Open
wants to merge 423 commits into
base: master
Choose a base branch
from
Open

Subway demo #1276

wants to merge 423 commits into from

Conversation

YutoUchimi
Copy link
Contributor

@YutoUchimi YutoUchimi commented Nov 7, 2019

Update on 2019/12/30

Requirements

Recommendations

@YutoUchimi YutoUchimi mentioned this pull request Nov 7, 2019
2 tasks
@knorth55
Copy link
Member

@YutoUchimi is this still wip?

@YutoUchimi YutoUchimi changed the title [WIP] [DO NOT MERGE YET] Subway demo Subway demo Oct 1, 2020
@knorth55
Copy link
Member

knorth55 commented Dec 9, 2020

I tried this PR today, and I got the following error when PR2 was going back from 7F elevator hall to 73B2.

[ INFO] [1607505304.689815109] [/elevator_move_base:ros.roseus]: Checking if elevator is needed...
[ INFO] [1607505304.767940219] [/elevator_move_base:ros.roseus]: cur-floor: /eng2/7f, target-floor: nil, target-coords: #<cascaded-coords #X170180d8 /eng2  511.799 5801.819 50000.0 / 3.034 0.0 0.0>
Call Stack (max depth: 20):
  0: at (send p1 :worldpos)
  1: at (elt (send p1 :worldpos) 2)
  2: at (< (elt (send p1 :worldpos) 2) (elt (send p2 :worldpos) 2))
  3: at (let ((p1 (find name1 objs :test #'equal :key #'(lambda (x) (send x :name)))) (p2 (find name2 objs :test #'equal :key #'(lambda (x) (send x :name))))) (< (elt (send p1 :worldpos) 2) (elt (send p2 :worldpos) 2)))
  4: at (send *scene* :floor< target-floor cur-floor)
  5: at (cond ((send *scene* :floor< target-floor cur-floor) "down") ((send *scene* :floor< cur-floor target-floor) "up") (t nil))
  6: at (setq up/down (cond ((send *scene* :floor< target-floor cur-floor) "down") ((send *scene* :floor< cur-floor target-floor) "up") (t nil)))
  7: at (let* ((goal (cdr (assoc :goal userdata))) (goal-pose (ros::tf-pose-stamped->coords (send goal :target_pose))) (cur-floor (check-current-floor *scene* *tfl*)) (target-floor (check-current-floor *scene* *tfl* goal-pose)) target-floor-button (target-coords (transform-pose-to-target-frame goal-pose (
send *scene* :name) *tfl*)) up/down) (ros::ros-info (format nil "cur-floor: ~A, target-floor: ~A, target-coords: ~A" cur-floor target-floor target-coords)) (setq up/down (cond ((send *scene* :floor< target-floor cur-floor) "down") ((send *scene* :floor< cur-floor target-floor) "up") (t nil))) (ros::ros-in
fo (format nil "up/down: ~A" up/down)) (setq target-floor-button (elt (assoc target-floor *floors* :test #'string= :key #'(lambda (x) (format nil "~A/~A" (send *scene* :name) (string-downcase (elt x 0))))) 0)) (set-alist 'inside-panel-name "/elevator_inside_panel" userdata) (set-alist 'outside-panel-name 
"/elevator_call_panel" userdata) (set-alist 'elevator-front-coords (let ((coords (send *scene* :transformation (car (send *scene* :find-object (format nil "~A/elevator-outside" cur-floor)))))) (send coords :name (send *scene* :name)) (send coords :rotate pi :z) (send coords :translate #f(0.0 -200.0 0.0) :
world) coords) userdata) (set-alist 'front-coords (let ((coords (send *scene* :transformation (car (send *scene* :find-object (format nil "~A/elevator_call_panel-front" cur-floor)))))) (send coords :name (send *scene* :name)) coords) userdata) (set-alist 'inside-coords (let ((coords (send *scene* :transfo
rmation (car (send *scene* :find-object (format nil "~A/elevator_inside_panel-front" cur-floor)))))) (send coords :name (send *scene* :name)) coords) userdata) (set-alist 'outside-coords (let ((coords (send *scene* :transformation (car (send *scene* :find-object (format nil "~A/elevator-outside" target-fl
oor)))))) (send coords :name (send *scene* :name)) coords) userdata) (set-alist 'target-floor target-floor-button userdata) (set-alist 'outside-button up/down userdata) (set-alist 'target-coords target-coords userdata) (not (null up/down)))
  8: at (funcall action userdata)
  9: at (funcall action userdata)
  10: at (cond ((send self :submachine) (send action :execute userdata :step step)) ((functionp action) (funcall action userdata)) (t (send self :name)))
  11: at (setq res (cond ((send self :submachine) (send action :execute userdata :step step)) ((functionp action) (funcall action userdata)) (t (send self :name))))
  12: at (let (res) (send self :remap userdata :invert nil) (setq res (cond ((send self :submachine) (send action :execute userdata :step step)) ((functionp action) (funcall action userdata)) (t (send self :name)))) (send self :remap userdata :invert t) res)
  13: at (send last-state :execute userdata)
  14: at (let* ((last-state astate) (trans (send self :next-arc-list astate)) (exec-result (send last-state :execute userdata))) (ros::ros-debug "trans: ~A" trans) (setq trans (remove-if-not #'(lambda (tr) (send tr :check exec-result)) trans)) (case (length trans) (0 (error "undefined transition ~A from ~
A~%" exec-result last-state)) (1 t) (t (case (length active-state) (1 (warn "multiple transitions ~A from ~A~%" exec-result last-state)) (t t)))) (when (not (eq astate last-state)) (error "active state has not changed ~A -> ~A~%" last-state astate) (return-from :execute-impl (send astate :name))) (setq ne
xt-active-state (append next-active-state (send-all trans :to))) (if (send astate :submachine) (send (send astate :submachine) :reset-state)) (push exec-result ret))
  15: at (while #:dolist10148331 (setq astate (pop #:dolist10148331)) (let* ((last-state astate) (trans (send self :next-arc-list astate)) (exec-result (send last-state :execute userdata))) (ros::ros-debug "trans: ~A" trans) (setq trans (remove-if-not #'(lambda (tr) (send tr :check exec-result)) trans)) (
case (length trans) (0 (error "undefined transition ~A from ~A~%" exec-result last-state)) (1 t) (t (case (length active-state) (1 (warn "multiple transitions ~A from ~A~%" exec-result last-state)) (t t)))) (when (not (eq astate last-state)) (error "active state has not changed ~A -> ~A~%" last-state asta
te) (return-from :execute-impl (send astate :name))) (setq next-active-state (append next-active-state (send-all trans :to))) (if (send astate :submachine) (send (send astate :submachine) :reset-state)) (push exec-result ret)))
  16: at (let ((astate nil) (#:dolist10148331 active-state)) nil (while #:dolist10148331 (setq astate (pop #:dolist10148331)) (let* ((last-state astate) (trans (send self :next-arc-list astate)) (exec-result (send last-state :execute userdata))) (ros::ros-debug "trans: ~A" trans) (setq trans (remove-if-no
t #'(lambda (tr) (send tr :check exec-result)) trans)) (case (length trans) (0 (error "undefined transition ~A from ~A~%" exec-result last-state)) (1 t) (t (case (length active-state) (1 (warn "multiple transitions ~A from ~A~%" exec-result last-state)) (t t)))) (when (not (eq astate last-state)) (error "
active state has not changed ~A -> ~A~%" last-state astate) (return-from :execute-impl (send astate :name))) (setq next-active-state (append next-active-state (send-all trans :to))) (if (send astate :submachine) (send (send astate :submachine) :reset-state)) (push exec-result ret))) nil)
  17: at (dolist (astate active-state) (let* ((last-state astate) (trans (send self :next-arc-list astate)) (exec-result (send last-state :execute userdata))) (ros::ros-debug "trans: ~A" trans) (setq trans (remove-if-not #'(lambda (tr) (send tr :check exec-result)) trans)) (case (length trans) (0 (error "
undefined transition ~A from ~A~%" exec-result last-state)) (1 t) (t (case (length active-state) (1 (warn "multiple transitions ~A from ~A~%" exec-result last-state)) (t t)))) (when (not (eq astate last-state)) (error "active state has not changed ~A -> ~A~%" last-state astate) (return-from :execute-impl 
(send astate :name))) (setq next-active-state (append next-active-state (send-all trans :to))) (if (send astate :submachine) (send (send astate :submachine) :reset-state)) (push exec-result ret)))
  18: at (let (ret next-active-state) (dolist (astate active-state) (let* ((last-state astate) (trans (send self :next-arc-list astate)) (exec-result (send last-state :execute userdata))) (ros::ros-debug "trans: ~A" trans) (setq trans (remove-if-not #'(lambda (tr) (send tr :check exec-result)) trans)) (ca
se (length trans) (0 (error "undefined transition ~A from ~A~%" exec-result last-state)) (1 t) (t (case (length active-state) (1 (warn "multiple transitions ~A from ~A~%" exec-result last-state)) (t t)))) (when (not (eq astate last-state)) (error "active state has not changed ~A -> ~A~%" last-state astate
) (return-from :execute-impl (send astate :name))) (setq next-active-state (append next-active-state (send-all trans :to))) (if (send astate :submachine) (send (send astate :submachine) :reset-state)) (push exec-result ret))) (setq active-state (unique next-active-state)) ret)
  19: at (send self :execute-impl args :step step)
  And more...
/opt/ros/indigo/share/euslisp/jskeus/eus/Linux64/bin/irteusgl roseus-error: cannot find method :worldpos in (send p1 :worldpos), exitting...
[ INFO] [1607505304.769530701] [/elevator_move_base:ros.roseus]: cell* ROSEUS_EXIT(context*, int, cell**)
[ INFO] [1607505304.769569842] [/elevator_move_base:ros.roseus]: exiting roseus 1
[elevator_move_base-1] process has died [pid 28575, exit code 1, cmd /home/applications/ros/indigo/src/jsk-ros-pkg/jsk_roseus/roseus/bin/roseus /home/applications/ros/indigo/src/jsk-ros-pkg/jsk_demos/elevator_move_base_pr2/src/elevator-move-base.l __name:=elevator_move_base __log:=/var/log/ros/b769458c-39
fa-11eb-835f-d05099c29feb/elevator_move_base-1.log].
log file: /var/log/ros/b769458c-39fa-11eb-835f-d05099c29feb/elevator_move_base-1*.log

cc. @mqcmd196

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

Successfully merging this pull request may close these issues.

2 participants