Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[irteus/irtviewer.l] support changing floor color. #528

Merged
merged 4 commits into from
Dec 21, 2018

Conversation

mmurooka
Copy link
Member

@mmurooka mmurooka commented Oct 9, 2018

Ex1) Set floor line color black.

(make-irtviewer)
(send *irtviewer* :change-background (float-vector 1 1 1))
(send *irtviewer* :set-val 'x::draw-floor 100)
(send *irtviewer* :set-val 'x::floor-color #f(0 0 0))
(send *irtviewer* :draw-objects)

irtviewer-color2

Ex2) Default color is white, which is same as before. So, visualization result does not change if you do not set floor color.

(make-irtviewer)
(send *irtviewer* :set-val 'x::draw-floor 100)
(send *irtviewer* :draw-objects)

irtviewer-color1

@mmurooka
Copy link
Member Author

I use this branch in Ubuntu 14.04 (indigo) / 16.04 (kinetic) for one week, and have no problem. I'm grad if someone review this.

Copy link
Member

@Affonso-Gui Affonso-Gui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked for me too.

Might be nice to have a setter function, instead of using :set-val.

@YoheiKakiuchi
Copy link
Member

YoheiKakiuchi commented Oct 16, 2018

Might be nice to have a setter function, instead of using :set-val.

+1

@mmurooka
Copy link
Member Author

mmurooka commented Oct 19, 2018

Thank you for review!

I think setter function is necessary for draw-origin, draw-floor, and floor-color.
https://github.com/euslisp/jskeus/blob/master/irteus/irtviewer.l#L65-L66

What name is good for setter function? :draw-floor or :set-draw-floor ?

@mmurooka
Copy link
Member Author

mmurooka commented Dec 11, 2018

Might be nice to have a setter function, instead of using :set-val.

added methods to set slot variables.

(make-irtviewer)

screenshot from 2018-12-11 15-08-44

(make-irtviewer)
(send *irtviewer* :set-draw-floor 100)
(send *irtviewer* :draw-objects)

screenshot from 2018-12-11 15-08-22

(make-irtviewer)
(send *irtviewer* :change-background (float-vector 1 1 1))
(send *irtviewer* :set-draw-floor 100)
(send *irtviewer* :set-floor-color #f(0 0 0))
(send *irtviewer* :draw-objects)

screenshot from 2018-12-11 15-08-07

@mmurooka mmurooka force-pushed the floor-color branch 2 times, most recently from 6ae07cf to 57a92eb Compare December 11, 2018 06:13
@k-okada
Copy link
Member

k-okada commented Dec 12, 2018

@mmurooka
Copy link
Member Author

added document.

method定義のところに簡単なコメントは書いてあったので,それ以上のドキュメントとなると,このような感じでしょうか.(それともmethod定義のところを充実させるほうが良い?ただ図が貼れないですね.)

screenshot from 2018-12-12 17-07-35

@k-okada
Copy link
Member

k-okada commented Dec 12, 2018 via email

@mmurooka
Copy link
Member Author

これって、make-irtviewer :floor-colorが可能なのかな?であれば、

可能です.0df8406 でコメント加えました.
(make-irtviewerで床の有無や色を指定する決まりにすれば,:set-floor-colorとかのmethodはいらなかったのかも,という気もする?)

fb82f4d のcommitは冗長であれば,rebaseで消します.

@k-okada
Copy link
Member

k-okada commented Dec 12, 2018

@mmurooka something wrong with you last commit, I think having 'set-floor-coloris ok, but I feelsend irtviewr :floor-color #f(1 2 3)and(setq floor-color (send irtviewer :floor-color))` looks familiar to me.

)) (./irtviewer.tex
LaTeX Warning: Reference `fig:irtviewer' on page 268 undefined on input line 3.
! LaTeX Error: File `fig/irtviewer.xbb' not found. Use -shell-escape option to 
generate automatically.
See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.9 ...[width=0.50\columnwidth]{fig/irtviewer.png}
                                                  
? 
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: 

@mmurooka mmurooka force-pushed the floor-color branch 5 times, most recently from 3cf4721 to aff456b Compare December 12, 2018 13:23
@mmurooka
Copy link
Member Author

something wrong with you last commit,

Fixed.

I think having 'set-floor-coloris ok, but I feelsend irtviewr :floor-color #f(1 2 3)and(setq floor-color (send irtviewer :floor-color))` looks familiar to me.

Setting nil is important for draw-floor slot variable in order to disable floor visualization.
Do you have any idea to do both of (send irtviewer :draw-floor nil) for disabling visualization and (setq draw-floor (send irtviewer :draw-floor)) for getting current state in Euslisp?

@k-okada
Copy link
Member

k-okada commented Dec 13, 2018 via email

@mmurooka
Copy link
Member Author

Please look at jsk/pfilter.l: (:debug (&optional (d :null)) (if (not (eq d :null)) (setq debug d)) debug)

Thank you, fixed.

@k-okada k-okada merged commit 3ff82c9 into euslisp:master Dec 21, 2018
@mmurooka mmurooka deleted the floor-color branch December 21, 2018 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants