Skip to content

Commit

Permalink
Merge pull request #720 from tkmtnt7000/PR-add-key-srv-name
Browse files Browse the repository at this point in the history
[roseus_smach] Add :srv-name key to exec-state-machine to set server_name manually
  • Loading branch information
k-okada committed Sep 13, 2022
2 parents 0ac603d + cec842d commit 4d45a0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roseus_smach/src/state-machine-utils.l
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;; state-machine-utils.l

(defun exec-state-machine (sm &optional (mydata '(nil))
&key (spin t) (hz 1) (root-name "SM_ROOT") iterate)
&key (spin t) (hz 1) (root-name "SM_ROOT") (srv-name "/server_name") iterate)
"Execute state machine
Args:
Expand All @@ -14,7 +14,7 @@ Args:
Returns:
the last active state
"
(let ((insp (instance state-machine-inspector :init sm :root-name root-name)))
(let ((insp (instance state-machine-inspector :init sm :root-name root-name :srv-name srv-name)))
(unix::usleep (round (* 0.5 1e6)))
(send sm :reset-state)
(send insp :publish-structure) ;; publish once and latch
Expand Down

0 comments on commit 4d45a0d

Please sign in to comment.