Open furushchev opened 6 years ago
I investigated a bit by testing simple version:
(make-package "HOGE")
(shadow 'Object (find-package "HOGE"))
(make-package "HOGE::OBJECT")
(in-package "ROS")
(defclass hoge::Object
:super ros::object
:slots ())
(defmethod hoge::Object
(:init ()
(send-super :init)))
;;
(make-package "HOGE::OBJECTARRAY")
(defclass hoge::ObjectArray
:super ros::object
:slots (_obj))
(defmethod hoge::ObjectArray
(:init ()
(send-super :init))
(:deserialize ()
(setq _obj (instance hoge::Object :init))))
;;
(in-package "USER")
(setq obj (instance hoge::ObjectArray :init))
(send obj :deserialize)
And this code runs without any problem.
The difference from the code with error might be whether :deserialize
method is called from eus or C (C++).
Actually this is a quite tricky one.
What is happening here is:
ObjectArray.l
gets loaded before Object.l
during load-ros-manifest
jsk_recognition_msgs::Object
becomes lisp::object
, since the symbol is still not defined in the jsk_recognition_msgs
package and exists in the lisp
package (which is used by default).(instance lisp::object :init)
leads to the no such method error.There are a few possible solutions for this:
lisp
package on ros message packages
Currently,
roseus
crashes on subscribing messages which have properties of the type name isObject
.For example,
jsk_recognition_msgs
now hasObject
andObjectArray
messages.After the command above,
roseus
crashes on deserialization:FYI: I misunderstood with the issue https://github.com/jsk-ros-pkg/jsk_roseus/issues/508 ?