-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix node name bug, when it attributes a namespace (and also fix #142) #149
Conversation
代案はありそうなのでちょっと調査時間をください.今日中には結論出します. |
あれっ,,, もしかして _with_namespace といってるけどちゃんと実装されていないということ?? https://github.com/rclex/rclex/blob/main/lib/rclex/resource_server.ex#L30-L38 https://github.com/rclex/rclex/blob/main/lib/rclex/resource_server.ex#L65-L69 @s-hosoai これがYesであれば,このようにしたいです.
|
@takasehideki @pojiro |
本PR、まだ動作確認していないため、確認+レビュー後にマージしてしまいますね。 |
ん?念のため確認ですが,
これは本PRで直してもらっているのでは? |
あ、、ほんまですね・・。ちゃんと現状把握してからコメントしないとだめですね。。少々お待ちを。 |
かんぜんにはあくしました。 |
とりあえずここで回答を続けますが,
はい,別のものとすべきです.
node_identifier は複数ノード生成の create_nodes 等で用いられるものかと.引数で与えられた node_name に prefix を付けて生成するやつですね.本質的には create_node の場合は prefix を付けないなど対応が必要かと思います. |
あとROS 2におけるnamespaceの関係資料です.topic,serviceに関するものですが,ノードについても同じ概念で名前空間を分けています. |
@takasehideki node_nameの重複確認は本件の範疇内だと思うので、このPR内で修正してしまう方が妥当な気がします。 |
In Nif, namespace and node_name are handled separately, but Rclex uses "namespace/node_name" format because unique ID is required for GenServer ID and Map key.
@takasehideki @pojiro |
これだと #142 が再燃しませんか? |
あ、NIF側ではしっかり分けてるのでissueのやつには引っかからないです。NIF側とrclex側のIDの扱いがごっちゃになってたのが要因なので、そのあたりは解決できたと思います。 |
それは失礼しました,,, あとでちゃんと動作確認してからmergeします! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
問題ないことを確認しました.mergeします!
**Full Changelog**: v0.7.0...v0.7.1 * New Contributors: @pojiro 🎉 * New features: * Improve unit test environment on local dev machine by @pojiro in #131 * Code Improvements/Fixes: * Enrich doc and specs with the awesome contributions by @pojiro (e.g., in #121) * Enrich unit tests with the awesome contributions by @pojiro (e.g., in #136) * Improve credo config, .credo.exs by @pojiro in #120 * exclude auto-generated files format by @pojiro in #135 * refactor Rclex.ResourceServer.call_nifs_rcl_node_init/5 by @pojiro in #147 * fix node name bug, when it attributes a namespace (and also fix #142) by @pojiro in #149 * Remove KeepSub module which is unused (also fix dialyzer error) by @s-hosoai in #164 * Improve README by @takasehideki in #171 * Bumps: * `credo` from 1.6.4 to 1.6.5 in #162 * Known issues to be addressed in the near future: * Lock `git_hooks` to 0.6.5 due to its issue in #138 * Bump to Humble Hawksbill in #114 * Release rcl nif resources when GerServer terminates in #160 * Note in this release: * After long consideration, we have decided to end the support for Dashing as the target environment 6ae367d
This commit fixes below, so closes #142
本修正方法だと、ノード名に namespace を含まなくなります。
それが rclex の方針と異なるようであれば、修正案をご指示いただきたいです。
※ただし、rclのリソースとしてはnamespeceを保持する点は維持しています。
修正前:
"#{namespace}/#{node_id}"
修正後:
"#{node_id}"