jsk-ros-pkg / jsk_roseus

ROS EusLisp Client
http://wiki.ros.org/roseus/Tutorials
17 stars 56 forks source link

Enable to call (one-shot-subscribe) safely in (let ...) scope #667

Open 708yamaguchi opened 3 years ago

708yamaguchi commented 3 years ago

For detail, please see https://github.com/jsk-ros-pkg/jsk_roseus/issues/666

There are several cases where (one-shot-subscribe) occurs an error.

1. (one-shot-subscribe ...) -> C-c -> reset -> (let (a) (one-shot-subscribe ...)) ;; Bug
2. (one-shot-subscribe ... :unsubscribe nil) -> (let (a) (one-shot-subscribe ...)) ;; Bug
3. (one-shot-subscribe ...) -> C-c -> (one-shot-subscribe ...) ;; Bug
4. (ros::subscribe topic ...) -> (one-shot-subscribe topic) -> Bug
5. one-shot-subscribe -> C-c -> reset -> (ros::spin-once) -> Endless loop if a message is received
6. one-shot-subscribe -> C-c -> reset -> (let (a) (ros::spin-once)) -> Segmentation Fault if a message is received

In this PR,

My concern is that by removing the :unsubscribe argument, backward compatibility will be lost.

Thank you very much for your help. @YoheiKakiuchi @pazeshun @Affonso-Gui

Affonso-Gui commented 3 years ago

It would also be nice to have some more debate and some other points of view on the changes below:

In some other minor comments:

708yamaguchi commented 3 years ago

Thank you very much for your review. I updated the code and pushed the commits.

I too would like to ask other people's ideas.

Affonso-Gui commented 3 years ago

@tkmtnt7000