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

examples: cpp: Add further instructions #66

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion examples/cpp/README.md
@@ -1,5 +1,21 @@
# How to build
# How to use

Copy link
Collaborator

Choose a reason for hiding this comment

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

for me, they are still build instructions.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can add more instructions here,
such create&use a container that cross-compile it

And follow the same title as Python instruction: https://github.com/bluerobotics/navigator-lib/blob/master/examples/python/README.md

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd say that the title of the 'Python instructions' document is not great, and in the future, if you add a "create&use a container that cross-compile it" instruction, you would need to create a different subsection anyway, then change the title when it makes sense.

For BlueOS (red-pill)

```shell
# Prepare the environment with cmake and cargo
sudo apt-get update && sudo apt-get install cmake git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

# Clone and move to Cpp folder
git clone https://github.com/bluerobotics/navigator-lib.git
cd examples/cpp

# Build with the following commands
cmake -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build --config Debug --parallel

# Run the binary
./build/simple

```