![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Name | Deps |
---|---|
task_compiler |
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Name | Deps |
---|---|
task_compiler | |
rosjava_messages | |
jsk_pepper_startup |
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Name | Deps |
---|---|
task_compiler |
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status |
|
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Name | Deps |
---|---|
task_compiler |
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]
Messages
Services
Plugins
Recent questions tagged roseus_smach at Robotics Stack Exchange
![]() |
roseus_smach package from jsk_roseus repojsk_roseus roseus roseus_mongo roseus_smach roseus_tutorials |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.7.5 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/jsk-ros-pkg/jsk_roseus.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-13 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Kei Okada
Authors
- Manabu Saito
roseus_smach
This package includes euslisp implementation of state machine and smach.
requirements
- roseus
- smach
-
smach_viewer
- Optional for visualization.
- You have to install this package manually:
sudo apt install ros-$ROS_DISTRO-smach-viewer
sample
Sample codes are available on sample
directory.
-
rosrun roseus_smach state-machine-ros-sample.l
- simple state machine
- simple state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-simple)
- nested state machine
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-nested)
- state machine with userdata
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach state-machine-ros-sample.l
(exec-smach-userdata)
-
sample/parallel-state-machine-sample.l
- state machine with parallel action execution
- state machine with parallel action execution
rosrun smach_viewer smach_viewer.py
rosrun roseus_smach parallel-state-machine-sample.l
(demo)
Writing Simple Smach(state-machine)
Example codes are here.
#!/usr/bin/env roseus
(load "package://roseus_smach/src/state-machine.l")
(setq count 0)
(defun func-foo (userdata-alist)
(format t "Execute state FOO~%")
(cond ((< count 3) (incf count) :outcome1)
(t :outcome2)))
(defun func-bar (userdata-alist)
(format t "Execute state BAR~%")
:outcome2)
(defun smach-simple ()
(let ((sm (instance state-machine :init)))
(send sm :add-node (instance state :init :FOO 'func-foo))
(send sm :add-node (instance state :init :BAR 'func-bar))
;; goal-states are generated in this method
(send sm :goal-state (list :outcome4 :outcome5))
;; select a node as start-node
(send sm :start-state :FOO)
;; from and to nodes are selected by name or symbol
(send sm :add-transition :FOO :BAR :outcome1)
(send sm :add-transition :FOO :outcome4 :outcome2)
(send sm :add-transition :BAR :FOO :outcome2)
sm ))
(send (smach-simple) :execute nil)
The Code Explained
(load "package://roseus_smach/src/state-machine.l")
This line imports state-machine class, state class, and transition class.
```lisp (defun func-foo (userdata-alist)
File truncated at 100 lines see the full file
Changelog for package roseus_smach
1.7.5 (2021-12-13)
-
[roseus_smach] add :append-goal-state (#696)
-
add nested example with make-state-machine function (#661)
- add readme on smach-simple-nested
* use defmacro instead of defun for make-simple-state without this, we need to write
` (setq sm-top (make-state-machine '((:bas :outcome3 :sub) ;; transitions (:sub :outcome4 :outcome5)) `((:bas 'func-bas) ;; functon maps (:sub ,sm-sub)) ;; set "nestaed state machine" '(:bas) ;; initial '(:outcome5) ;; goal ))
[ to avoid ]{.title-ref}/opt/ros/melodic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl unittest-error: unbound variable sm-sub in (eval (get-alist node func-map)), exitting...
[ errors, this change enable us to write intuitive way ]{.title-ref}'((:bas 'func-bas) ;; functon maps (:sub sm-sub)) ;; set "nestaed state machine"
[ you can test this behavior with ]{.title-ref}(defmacro test (l) `(dolist (e ,l) (print e) (print (eval (cadr e))))) (defmacro test (l) (dolist (e l) (print e) (print (eval (cadr e))))) (let (a) (setq a 10) (test '((:foo 1) (:bar a))))
` -
[roseus_smach] make roseus_smach execution faster (#684)
- sleep 0.5 s for publisher
- use ros::sleep for smach execution
-
[roseus_smach] add more ros-info in convert-smach (#683)
-
[roseus_smach] fix typo in state-machine-utils.l (#693)
-
[roseus_smach] add :start-state and :goal-state in convert-smach (#682)
-
[roseus_smach] add groupname in state-machine-inspector (#691)
- use send sm :spin-once in state-machine-utils.l
- add groupname and spin-once with groupname
-
Updates to README sample code and explanations (#659)
- extend test time limit to 120 sec for test-samples.l
- add example/test for smach-simple with make-state-machine function
- write more info similar to rospy implementation
- add more info(URL/python code) on sample
- fix typo of nestate state machine example path
- add make-sample-parallel-state-machine tests
- add more test, check :active-tates, duration time
-
[roseus_smach] use roseus for parallel-state-machine-sample (#651)
-
[roseus_smach] add smach_viewer installation to README (#641)
-
[roseus_smach] add code explanation of simple-state-machine in README.md. (#627)
-
Contributors: Guilherme Affonso, Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yoichiro Kawamura
1.7.4 (2019-02-04)
1.7.3 (2019-02-01)
- check why test-smach-action-client-state failing on installed test (#570 )
- fix make-state-machine docstring (#589 )
- re-enable test-smach-action-client-state, which is removed in https://github.com/jsk-ros-pkg/jsk_roseus/pull/567#issuecomment-406841511
- Add issue link in make-state-machine docstring (#595 )
- roseus_smach: change the order of callee args for userdata in pddl2smach (#587)
- roseus_smach: pass userdata values unless :arg-keys is set
(#586)
- roseus_smach: fix error on exec state machine without ri
- Contributors: Guilherme Affonso, Yuki Furuta, Shingo Kitagawa
1.7.2 (2018-11-10)
1.7.1 (2018-07-22)
-
add melodic test (#567)
- split test_samples.test into test_samples_action_client_state.test, since it is always failling on only installed test https://api.travis-ci.org/v3/job/406576370/log.txt, not sure why...
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
roseus | |
rostest | |
std_msgs | |
actionlib | |
smach | |
smach_ros | |
smach_msgs | |
actionlib_tutorials | |
message_generation | |
catkin | |
euslisp | |
message_runtime |
System Dependencies
Dependant Packages
Name | Deps |
---|---|
task_compiler |
Launch files
- sample/sample_smach_exit_state.launch
-
- gui [default: true]
- userdata [default: true]