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

Installing Groot and BehaviorTree.CPP in docker #156

Open
AmitNativ1984 opened this issue Jun 26, 2022 · 3 comments
Open

Installing Groot and BehaviorTree.CPP in docker #156

AmitNativ1984 opened this issue Jun 26, 2022 · 3 comments

Comments

@AmitNativ1984
Copy link
Contributor

Hello,
I had a problem building Groot with BehaviorTree.CPP inside docker.
To solve it, I had to follow the specific instructions for building BehaviorTree.CPP.
So if anyone might benefit from this... Here is the part from my Dockerfile to install both Groot and BehaviorTree.CPP

RUN git clone https://github.com/BehaviorTree/Groot.git &&\
    cd Groot &&\
    git submodule update --init --recursive &&\
    cd depend/BehaviorTree.CPP &&\
    mkdir build ; cd build &&\
    cmake .. &&\
    make &&\
    sudo make install &&\
    cd /root/Groot &&\
    mkdir build; cd build &&\
    cmake .. &&\
    make &&\
    # add alias for Groot GUI (simply type "Groot" in terminal)
    echo 'alias Groot="cd /root/Groot/build && ./Groot"' >> ~/.bashrc
@igricart
Copy link

igricart commented Jul 7, 2022

Which error did you have?
I also couldn't build from master so I checked out the branch that reverts #157 and it works

@MrBlenny
Copy link

What worked for me was:

Dockerfile:

FROM ubuntu:focal

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y -q git build-essential cmake python3 libzmq3-dev qt5-default libqt5svg5-dev

RUN git clone https://github.com/BehaviorTree/Groot.git &&\
    cd Groot &&\
    git submodule update --init --recursive &&\
    cd depend/BehaviorTree.CPP &&\
    mkdir build ; cd build &&\
    cmake .. &&\
    make &&\
    make install &&\
    cd /Groot &&\
    mkdir build; cd build &&\
    cmake .. &&\
    make &&\
    # add alias for Groot GUI (simply type "Groot" in terminal)
    echo 'alias Groot="cd /Groot/build && ./Groot"' >> ~/.bashrc

# fixes: "error while loading shared libraries: libbehaviortree_cpp_v3.so: cannot open shared object"
RUN ldconfig

CMD cd /Groot/build && ./Groot

Compose

Of course requires mounting x11 as a volume:

  groot:
    container_name: groot
    build:
      context: ./path_to_folder_with_dockerfile
    environment:
      - DISPLAY
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix:rw

@AmitNativ1984
Copy link
Contributor Author

Thank you. It works!

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

No branches or pull requests

3 participants