Robotics StackExchange | Archived questions

Groot installation on ROS2 Galactic

Hi everyone I'm facing the next errors when trying to install Groot on ROS2 Galactic

usr/include/zmq.hpp:638:14: error: ‘ZMQ_BLOCKY’ was not declared in this scope; did you mean ‘ZMQ_NOBLOCK’?
  638 |     blocky = ZMQ_BLOCKY,
      |              ^~~~~~~~~~
      |              ZMQ_NOBLOCK
/usr/include/zmq.hpp:642:31: error: ‘ZMQ_THREAD_AFFINITY_CPU_ADD’ was not declared in this scope
  642 |     thread_affinity_cpu_add = ZMQ_THREAD_AFFINITY_CPU_ADD,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:643:34: error: ‘ZMQ_THREAD_AFFINITY_CPU_REMOVE’ was not declared in this scope
  643 |     thread_affinity_cpu_remove = ZMQ_THREAD_AFFINITY_CPU_REMOVE,
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:644:26: error: ‘ZMQ_THREAD_NAME_PREFIX’ was not declared in this scope
  644 |     thread_name_prefix = ZMQ_THREAD_NAME_PREFIX,
      |                          ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:645:17: error: ‘ZMQ_MAX_MSGSZ’ was not declared in this scope; did you mean ‘ZMQ_MAXMSGSIZE’?
  645 |     max_msgsz = ZMQ_MAX_MSGSZ,
      |                 ^~~~~~~~~~~~~
      |                 ZMQ_MAXMSGSIZE
/usr/include/zmq.hpp:652:18: error: ‘ZMQ_MSG_T_SIZE’ was not declared in this scope
  652 |     msg_t_size = ZMQ_MSG_T_SIZE
  |                  ^~~~~~~~~~~~~~

Where should I define this vars? Thanks in advance!

Asked by lfb on 2022-08-07 13:07:42 UTC

Comments

Answers

For using Groot I have used this tutorial:

And these steps for the ROS2 Galactic installation:

   cd ~/dev_ws/src
   git clone https://github.com/BehaviorTree/Groot.git
   cd ..
   rosdep install --from-paths src --ignore-src
   colcon build --symlink-install --packages-select groot

I have sudo apt install ros-galactic-behaviortree-cpp-v3 before too.

You have to source install/setup.bash and then ./build/groot/Groot.

Can you check your installation with these steps? I installed it this way on ROS2 Galactic without errors (there were some warnings though). Maybe you missed some dependency?

Asked by ljaniec on 2022-08-08 06:26:03 UTC

Comments

Thanks, @ljaniec! I think it was a conflict with a previous version of the libzmq library that I had on my system. To avoid the errors/warnings I had also to build depend/BehaviorTree.CPP from Groot...I don't know if it has any sense... Do you know if there is a simple tutorial/example of a ROS2 package with BT to check if everything is fine? Thanks again!

Asked by lfb on 2022-08-08 12:04:37 UTC

I think the easiest way is use of Nav2 Simple Commander with goThroughPoses(poses, behavior_tree='') where you would put your modified BT, or just use some demos (e.g. demo_recoveries.py) with Groot BT visualization.

If my answer helped you, please upvote and accept it as correct so that it will be visible in the question queue as solved.

Asked by ljaniec on 2022-08-08 14:22:32 UTC

Thanks @ljaniec! Of course it helped me. Thanks again!

Asked by lfb on 2022-08-09 01:42:42 UTC