Skip to content

Commit

Permalink
Merge pull request #1060 from Affonso-Gui/def-set-get-param-method
Browse files Browse the repository at this point in the history
Remove all ros::object slots in def-set-get-param-method
  • Loading branch information
k-okada authored Dec 12, 2019
2 parents e6dc0ab + 694f03a commit a325902
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hrpsys_ros_bridge/euslisp/rtm-ros-robot-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,13 @@
(debug nil))
(when (boundp param-class)
(let* ((param-slots-list ;; get slots list for param-class
(remove-if #'(lambda (x) (or (string= "plist" x) (string= "connection-header" x)))
(mapcar #'(lambda (x) (string-left-trim "::_" (string-left-trim "ros" (format nil "~A" x))))
(concatenate cons (send (eval param-class) :slots)))))
;; coerce to cons to avoid :count glitches on vectors
;; https://github.com/euslisp/EusLisp/issues/295
(let ((slt (coerce (send (eval param-class) :slots) cons)))
(map nil #'(lambda (obj) (setq slt (remove obj slt :count 1)))
(send ros::object :slots))
(mapcar #'(lambda (x) (string-left-trim "_" (symbol-name x)))
slt)))
(param-name
;; Extract param class, e.g., extract zz from hrpsys_ros_bridge::xx_yy_zz
(car (last (read-from-string (substitute (elt " " 0) (elt ":" 0) (substitute (elt " " 0) (elt "_" 0) (format nil "(~A)" param-class)))))))
Expand Down

0 comments on commit a325902

Please sign in to comment.