-
Notifications
You must be signed in to change notification settings - Fork 16
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
[generate.py] Fix bug of write_constants #59
Closed
Closed
Conversation
This file contains 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
Thanks
1) can you create test code for this issues?
2) can you check rospy/roscpp behavior?
2018年12月3日(月) 16:59 Taichi Higashide <[email protected]>:
Now, we cannot get a default boolean rosmsg value.
For example, if create test_msg.msg message in eus_test_msg package like
below,
bool flag
bool FLAG=1
I always get nil as a default value even though I set FLAG=1.
1.irteusgl$ ros::load-ros-manifest "eus_msg_test"
t
2.irteusgl$ setq msg (instance eus_msg_test::test_msg :init)
#<eus_msg_test::test_msg #X6396318>
3.irteusgl$ send msg :flag eus_msg_test::test_msg::*flag*
nil
The cause of this problem is this line.
geneus/src/geneus/generate.py
<https://github.com/jsk-ros-pkg/geneus/blob/a97101f8ce8aa95bbaa9dee1586bcfccc9abf125/src/geneus/generate.py#L673>
Line 673 in a97101f
<http:///jsk-ros-pkg/geneus/commit/a97101f8ce8aa95bbaa9dee1586bcfccc9abf125>
s.write('(defconstant %s::%s::*%s* %s)'%(spec.package, spec.actual_name,
c.name.upper(), "t" if c.val == "True" else "nil"))
This line's "True" should not be string value.
"t" if c.val == "True" else "nil"
after fix like below, I got correct boolean default value.
"t" if c.val == True else "nil"
------------------------------
You can view, comment on, or merge this pull request online at:
#59
Commit Summary
- fix bug of write_constants
File Changes
- *M* src/geneus/generate.py
<https://github.com/jsk-ros-pkg/geneus/pull/59/files#diff-0> (2)
Patch Links:
- https://github.com/jsk-ros-pkg/geneus/pull/59.patch
- https://github.com/jsk-ros-pkg/geneus/pull/59.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#59>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3EWjNXzMf_WVbZMSi-kdgyQyyvznks5u1NnugaJpZM4Y-Dlf>
.
--
--
◉ Kei Okada
|
|
@k-okada Maybe I got mistake. Is it correct to add |
k-okada
added a commit
to k-okada/geneus
that referenced
this pull request
Jan 9, 2019
k-okada
added a commit
to k-okada/geneus
that referenced
this pull request
Jan 9, 2019
k-okada
added a commit
to k-okada/geneus
that referenced
this pull request
Jan 9, 2019
k-okada
added a commit
to k-okada/geneus
that referenced
this pull request
Jan 9, 2019
k-okada
added a commit
to k-okada/geneus
that referenced
this pull request
Jan 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now, we cannot get a default boolean rosmsg value.
For example, if create
test_msg.msg
message ineus_test_msg
package like below,I always get
nil
as a default value even though I setFLAG=1
.The cause of this problem is this line.
geneus/src/geneus/generate.py
Line 673 in a97101f
This line's "True" should not be string value.
after fix like below, I got correct boolean default value.