Forked from kochigami/gist:49b4132dbc47e318c319b5db8db20251
Last active
September 26, 2016 04:54
-
-
Save furushchev/681fa6bb27d898345b04c651e5621ffb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env roseus | |
;;; | |
;;; euslisp version of ros_tutorials/rospy_tutorials/001_talker_listener | |
;;; | |
;; redefine https://github.com/jsk-ros-pkg/jsk_roseus/blob/1.5.3/roseus/euslisp/roseus.l#L17 | |
(defun ros::roseus-sigint-handler (sig code) | |
(ros::ROS-WARN (format nil "ros::roseus-sigint-handler ~A" sig)) | |
(ros::ros-info "hogehoge") | |
(ros::publish "chatter" (instance std_msgs::string :init :data "hoge")) | |
(exit 1)) | |
;; | |
(ros::load-ros-manifest "roseus") | |
;; | |
(ros::roseus "talker") | |
(ros::advertise "chatter" std_msgs::string 1) | |
(ros::rate 100) | |
(while (ros::ok) | |
(setq msg (instance std_msgs::string :init)) | |
(send msg :data (format nil "hello world ~a" (send (ros::time-now) :sec-nsec))) | |
(ros::ros-info "msg [~A]" (send msg :data)) | |
(ros::publish "chatter" msg) | |
(ros::sleep) | |
) | |
(ros::roseus-sigint-handler ros::sig ros::code) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment