Skip to content

Comments

Fix package import issue in state-machine-*.l#754

Open
mqcmd196 wants to merge 1 commit intojsk-ros-pkg:masterfrom
mqcmd196:fix-roseus-smach-import
Open

Fix package import issue in state-machine-*.l#754
mqcmd196 wants to merge 1 commit intojsk-ros-pkg:masterfrom
mqcmd196:fix-roseus-smach-import

Conversation

@mqcmd196
Copy link
Member

In state-machine-utils.l, state-machine-inspector class is initialized. However, it is in state-machine-ros.l.

Without this PR, when I use exec-state-machine function, the error occurs like

Call Stack (max depth: 20):
  0: at (instantiate state-machine-inspector)
  1: at (let ((#:inst5417 (instantiate state-machine-inspector))) (send #:inst5417 :init sm :root-name root-name :srv-name srv-name) #:inst5417)
  2: at (instance state-machine-inspector :init sm :root-name root-name :srv-name srv-name)
  3: at (let ((insp (instance state-machine-inspector :init sm :root-name root-name :srv-name srv-name))) (unix:usleep (round (* 0.5 1.000000e+06))) (send sm :reset-state) (send insp :publish-structure) (apply #'send sm :arg-keys (union (send sm :arg-keys) (mapcar #'car mydata))) (if exit-state (send insp :register-exit-signal-hook exit-state mydata exit-signal-hook-func)) (ros::rate hz) (while (ros::ok) (when spin (send insp :spin-once) (if (and (boundp '*ri*) *ri*) (send *ri* :spin-once))) (send insp :publish-status mydata) (when (send sm :goal-reached) (return)) (when iterate (cond ((functionp iterate) (unless (funcall iterate (send sm :active-state)) (ros::ros-warn "set abort in iteration") (return)) (iterate (unless (y-or-n-p (format nil "Execute ~A ? " (send (send sm :active-state) :name))) (ros::ros-warn "aborting...") (return)) (t (error "value of key :iterate must be t or function")))))) (send sm :execute mydata :step -1) (ros::sleep)) (send sm :active-state))
  4: at (exec-state-machine (state-machine) userdata-alist)
  5: at (let (userdata-alist) (setq userdata-alist '((fiducial-initialized))) (exec-state-machine (state-machine) userdata-alist))
  6: at (main)
/opt/ros/noetic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl: ERROR th=0 unbound variable state-machine-inspectorstate-machine-inspector in (instantiate state-machine-inspector)E: ^C^C

This PR fixes it to load state-machine-ros.l in state-machine-utils.l

@mqcmd196 mqcmd196 force-pushed the fix-roseus-smach-import branch from 201ae74 to de6a38b Compare February 10, 2025 11:13
@mqcmd196 mqcmd196 requested a review from k-okada February 10, 2025 11:17
@mqcmd196
Copy link
Member Author

CI green

@mqcmd196 mqcmd196 force-pushed the fix-roseus-smach-import branch from de6a38b to 3075a8d Compare March 3, 2025 05:43
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.

1 participant