Add a build script for wx_armor - #25
Conversation
le-horizon
left a comment
There was a problem hiding this comment.
Thanks for the nice PR. A couple suggestions if they make sense.
|
|
||
| Users must also set `LD_LIBRARY_PATH` to the shared library locations. In your `~/.bashrc`, add the following line: | ||
| ```bash | ||
| export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH |
There was a problem hiding this comment.
Maybe add a check in build.sh to add this to .bashrc if not already there?
There was a problem hiding this comment.
I tried doing this, but since this build script is being run using sudo, it uses the root's .bashrc instead. Since there's no easy fix for this, I simply omitted it. Instead, I have the part about setting LD_LIBRARY_PATH be the first step in README.
| - `sudo apt install -y yaml-cpp-dev` | ||
|
|
||
| #### Building From Source | ||
|
|
There was a problem hiding this comment.
Add some explanation about the system requirements, e.g. ubuntu version tested etc..
Also add a link to our other repo for running on Jetson devices.
There was a problem hiding this comment.
Good point. Done.
QuantuMope
left a comment
There was a problem hiding this comment.
Hey Le, thanks for the review. Addressed your comments. PTAL.
I can also confirm that the build script works flawlessly on Ubuntu 24.04, in addition to 22.04.
| - `sudo apt install -y yaml-cpp-dev` | ||
|
|
||
| #### Building From Source | ||
|
|
There was a problem hiding this comment.
Good point. Done.
|
|
||
| Users must also set `LD_LIBRARY_PATH` to the shared library locations. In your `~/.bashrc`, add the following line: | ||
| ```bash | ||
| export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH |
There was a problem hiding this comment.
I tried doing this, but since this build script is being run using sudo, it uses the root's .bashrc instead. Since there's no easy fix for this, I simply omitted it. Instead, I have the part about setting LD_LIBRARY_PATH be the first step in README.
le-horizon
left a comment
There was a problem hiding this comment.
LG. Btw, is there any instruction about udev rules? wx_armor fails to talk to the arm w/o the udev rules to define /dev/ttyDXL
The merge-base changed after approval.
7e5238d to
89a076f
Compare
|
Forced pushed a rebase to main @le-horizon |
le-horizon
left a comment
There was a problem hiding this comment.
Thanks for the automation. Some suggestions to make the process even more automatic.
| # Install json | ||
| cd /tmp | ||
| rm -rf json | ||
| git clone https://github.com/nlohmann/json | ||
| cd json | ||
| mkdir build | ||
| cd build | ||
| cmake .. | ||
| make -j"$(nproc)" | ||
| make install | ||
| cd /tmp | ||
| rm -rf json | ||
| cd "$HOME_DIR" |
There was a problem hiding this comment.
This will do:
sudo apt-get install -y nlohmann-json3-dev
Also need these:
sudo apt-get install -y udev libyaml-cpp-dev libspdlog-dev gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev
|
@QuantuMope could you work on this PR so we can close #33? Also need to avoid using |
f1cfc45 to
5cddb5e
Compare
QuantuMope
left a comment
There was a problem hiding this comment.
Hey Le, addressed all comments. Also, added a cmake fix to avoid the .bashrc LD_LIBRARY_PATH setting.
Tested that everything works on gail7.
b59ae20 to
22fcc66
Compare
le-horizon
left a comment
There was a problem hiding this comment.
Just one question. Thanks for the automation!
| spdlog::spdlog | ||
| nlohmann_json::nlohmann_json | ||
| yaml-cpp) | ||
| yaml-cpp::yaml-cpp) |
There was a problem hiding this comment.
dynamixel_sdk dependency seems to be missing, have you tested CMake w/o LD_LIBRARY_PATH?
There was a problem hiding this comment.
Yeah I have. I unset it. I don't think that dependency existed before in the cmake. Could be that toolbox refers to sdk in its own cmake.
This PR adds an automated build script for
wx_armor. It's quite annoying / tedious to have to install it on fresh machines. This script should now handle all necessary dependencies seamlessly.Tested on two separate machines.
An old tutorial can be found here for reference.
https://horizonrobotics.feishu.cn/wiki/NYL6wgBc8i05O0kLkk2cqFNxn2g