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

Support humble, galactic Nerves #244

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Support humble, galactic Nerves #244

merged 3 commits into from
Sep 8, 2023

Conversation

pojiro
Copy link
Contributor

@pojiro pojiro commented Sep 7, 2023

Nerves 対応を行った PR です。

https://hexdocs.pm/rclex/use_on_nerves.html をなぞり、 ターゲットの RPI4 でパブリッシュさせ、ホストの ros2 topic echo /chatter std_msgs/msg/String で受信を確認しました。

image

動作確認に使用した Nerves プロジェクトは https://github.com/pojiro/rclex_usage_on_nerves

@pojiro pojiro force-pushed the support-humble-nerves branch 3 times, most recently from 40d7012 to 40653cf Compare September 8, 2023 00:46
@pojiro pojiro force-pushed the support-humble-nerves branch 4 times, most recently from 7dd0175 to 7cc88fd Compare September 8, 2023 04:20
Comment on lines +129 to +130
## only galactic needs /opt/ros/galactic/lib/aarch64-linux-gnu also, for libddsc
# -e LD_LIBRARY_PATH=/opt/ros/galactic/lib/aarch64-linux-gnu:/opt/ros/galactic/lib
Copy link
Contributor Author

Choose a reason for hiding this comment

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

galactic だけ、 /opt/ros/galactic/lib/aarch64-linux-gnu 配下の `libddsc.so*, cyclonedds のライブラリが必要となるのでパスが必要でした。

ただし、 ROS 2 としては humble でも LD_LIBRARY_PATH に追加されています。
※追加されているが、ディレクトリの実体はない

$ docker run --rm -it  arm64v8/ros:humble-ros-core /bin/bash
root@206b74edebab:/# env
...
LD_LIBRARY_PATH=/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib
...
root@206b74edebab:/# ls /opt/ros/humble/lib/aarch64-linux-gnu
ls: cannot access '/opt/ros/humble/lib/aarch64-linux-gnu': No such file or directory

Rclex としては、 galactic でない限り、 /opt/ros/ROS_DISTRO/lib/aarch64-linux-gnu は不要なのでドキュメント上、galactic のみ必要という記載に一旦しました。

Copy link
Member

Choose a reason for hiding this comment

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

機能面は perfect!! ですが,ドキュメントはちょっと悩ましいですね.humble 前提に絞っても良い気がしています(galacticfoxy で使いたいときは他にも細々と合わせる必要がある).

いったん merged! として,ドキュメントは v0.9.0 リリース時に私が検討・対応するということでいかがでしょうか?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

いったん merged! として,ドキュメントは v0.9.0 リリース時に私が検討・対応するということでいかがでしょうか?

承知しました。よろしくお願いいたします!

Comment on lines +151 to +153
# humble needs OpenSSL 3.x which Nerves doesn't have
"/lib/#{dir_name}/libssl.so*",
"/lib/#{dir_name}/libcrypto.so*"
Copy link
Contributor Author

@pojiro pojiro Sep 8, 2023

Choose a reason for hiding this comment

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

Nerves には libssl, libcrypt が存在します(以下 find の結果)が humble が要求する so のバージョンと異なることが分かったため足すようにしています。※これが無いと Rclex.rclex.init/0 で VM が落ちます。

iex(3)> cmd "find / -name 'libssl*'"
/usr/lib/libssl.so
/usr/lib/libssl.so.1.1
iex(4)> cmd "find / -name 'libcrypt*'"
/lib/libcrypt.so.1
/usr/lib/libcrypto.so
/usr/lib/libcrypto.so.1.1

@pojiro pojiro changed the title Support humble Nerves Support humble, galactic Nerves Sep 8, 2023
@pojiro pojiro marked this pull request as ready for review September 8, 2023 05:37
Copy link
Member

@takasehideki takasehideki left a comment

Choose a reason for hiding this comment

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

LGTM! awesome!! ❤️

@takasehideki takasehideki merged commit 9a6628a into main Sep 8, 2023
11 checks passed
@takasehideki takasehideki deleted the support-humble-nerves branch September 8, 2023 07:43
takasehideki added a commit that referenced this pull request Sep 11, 2023
**Full Changelog**: v0.8.5...v0.9.0

* New features:
  * Support Humble (and format with Elixir 1.15.5) by @pojiro in #241
  * Support humble, galactic Nerves by @pojiro in #244
  * change the recommended environment and versions by @takasehideki in #247
  * Add humble support to arm32v7_ros_distros by @pojiro in #248
* Code Improvements/Fixes:
  * Fix bug of `mix rclex.gen.msgs` by @pojiro in #236
  * fix docs about ROS_DISTRO from `foxy` to `humble` by @takasehideki in #249
* Bumps:
  * Bump ex_doc from 0.29.4 to 0.30.6 by @dependabot in #234 #237 #238
  * Bump dialyxir from 1.3.0 to 1.4.1 by @dependabot in #240
  * Bump mix_test_watch from 1.1.0 to 1.1.1 by @dependabot in #242
* Known issues to be addressed in the near future:
  * Lock `git_hooks` to 0.6.5 due to its issue in #138
  * Release rcl nif resources when GerServer terminates in #160
  * `publish/2` sometimes failed just after `create_publisher/3` in #212
  * CI fails randomly at mix test in #246
  * Bump to Iron Irwini in #228
* Note in this release:
  * Please welcome Humble Hawksbill as the new supported distribution for Rclex!! 🎉
@takasehideki takasehideki mentioned this pull request Sep 11, 2023
takasehideki added a commit that referenced this pull request Sep 11, 2023
**Full Changelog**: v0.8.5...v0.9.0

* New features:
  * Support Humble (and format with Elixir 1.15.5) by @pojiro in #241
  * Support humble, galactic Nerves by @pojiro in #244
  * change the recommended environment and versions by @takasehideki in #247
  * Add humble support to arm32v7_ros_distros by @pojiro in #248
* Code Improvements/Fixes:
  * Fix bug of `mix rclex.gen.msgs` by @pojiro in #236
  * fix docs about ROS_DISTRO from `foxy` to `humble` by @takasehideki in #249
* Bumps:
  * Bump ex_doc from 0.29.4 to 0.30.6 by @dependabot in #234 #237 #238
  * Bump dialyxir from 1.3.0 to 1.4.1 by @dependabot in #240
  * Bump mix_test_watch from 1.1.0 to 1.1.1 by @dependabot in #242
* Known issues to be addressed in the near future:
  * Lock `git_hooks` to 0.6.5 due to its issue in #138
  * Release rcl nif resources when GerServer terminates in #160
  * `publish/2` sometimes failed just after `create_publisher/3` in #212
  * CI fails randomly at mix test in #246
  * Bump to Iron Irwini in #228
* Note in this release:
  * Please welcome Humble Hawksbill (and Galactic Geochelone) as the new supported distribution for Rclex!! 🎉
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.

None yet

2 participants