Ask Your Question
0

MicroXRCEAgenet Build and Install fails with missing TINY2_SOURCE_DIR in cmake

asked 2019-07-27 21:25:54 -0500

Ed C. gravatar image

Environment

  • Turtlebot3 Waffle
  • Intel i5 NUC
  • Ubuntu 18.04
  • ROS2 Dashing

MicroXRCEAgent bin not found

I found a ros-crystal-micro-xrce-dds-agent package for apt. There isn't one for dashing. So I tried to build it.

MicroXRCEAgent build failed on dashing

Reference: Micro-XRCE-DDS-Agent build Insturctions See my build log below.

ERROR during cmake: "Could NOT find tinyxml2 (missing: TINYXML2_SOURCE_DIR)" See below for build log.

Reference: Similar error on a BegleBone with ROS1 The solution of installing liblinyxml2-dev on top of everything did not solve this problem.

Link to CMakeList.txt

Question

How do I fix MicroXRCEAgent build and install?

 $ cd

 $ git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
     Cloning into 'Micro-XRCE-DDS-Agent'...
     remote: Enumerating objects: 168, done.
     remote: Counting objects: 100% (168/168), done.
     remote: Compressing objects: 100% (68/68), done.
     remote: Total 7098 (delta 104), reused 128 (delta 76), pack-reused 6930
     Receiving objects: 100% (7098/7098), 1.79 MiB | 8.83 MiB/s, done.
     Resolving deltas: 100% (4071/4071), done.

 $ cd Micro-XRCE-DDS-Agent

 $ ls
     agent.refs          Dockerfile  microxrce_agent.cpp  thirdparty
     cmake               docs        README.md            utils
     CMakeLists.txt      include     src                  valgrind.supp
     CTestJenkins.cmake  LICENSE     test

 $ git checkout a495c65faa964ddc068ac6e1249f17f5c9f92787
     Note: checking out 'a495c65faa964ddc068ac6e1249f17f5c9f92787'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

     HEAD is now at a495c65 Merge pull request #54 from eProsima/feature/baudrate

 $ mkdir build

 $ cd build

 $ cmake -DTHIRDPARTY=ON -DCONFIG_UDP_TRANSPORT_MTU=8192 -DCONFIG_SERIAL_TRANSPORT_MTU=8192 ..
     -- Setting build type to 'Release' as none was specified.
     -- The C compiler identification is GNU 7.4.0
     -- The CXX compiler identification is GNU 7.4.0
     -- Check for working C compiler: /usr/bin/cc
     -- Check for working C compiler: /usr/bin/cc -- works
     -- Detecting C compiler ABI info
     -- Detecting C compiler ABI info - done
     -- Detecting C compile features
     -- Detecting C compile features - done
     -- Check for working CXX compiler: /usr/bin/c++
     -- Check for working CXX compiler: /usr/bin/c++ -- works
     -- Detecting CXX compiler ABI info
     -- Detecting CXX compiler ABI info - done
     -- Detecting CXX compile features
     -- Detecting CXX compile features - done
     -- fastcdr library found...
     -- Could NOT find tinyxml2 (missing: TINYXML2_SOURCE_DIR) 
     -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1") 
     -- fastrtps library found...
     Submodule 'thirdparty/asio' (https://github.com/chriskohlhoff/asio.git) registered for path 'thirdparty/asio'
     Cloning into '/home/eepp/Micro-XRCE-DDS-Agent/thirdparty/asio'...
     Submodule path 'thirdparty/asio': checked out '230c0d2ae035c5ce1292233fcab03cea0d341264'
     -- Found Asio: /home/eepp/Micro-XRCE-DDS-Agent/thirdparty/asio/asio/include  
     -- Configuring done
     -- Generating done
     -- Build files have been written to: /home/eepp/Micro-XRCE-DDS-Agent/build
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-29 10:02:17 -0500

mkhansen gravatar image

Are you sure the tinyxml install worked completely? Did you run 'apt search tinyxml' to make sure the package is there?

The only other thing could be a PATH problem. I would find your TINYXML2_SOURCE_DIR and see if it's in your path.

edit flag offensive delete link more

Comments

The package is there

 $ apt search libtinyxml2-dev
    Sorting... Done
    Full Text Search... Done
    libtinyxml2-dev/bionic,now 6.0.0+dfsg-1 amd64 [installed]
      TinyXML2 library - header and static library
Ed C. gravatar imageEd C. ( 2019-07-29 10:34:34 -0500 )edit

I can find tinyxml source here

$ ls ~/turtlebot3_ws/src/navigation2/BehaviorTree.CPP/3rdparty/tinyXML2/
    tinyxml2.cpp  tinyxml2.h
$ ls /usr/include/tin*
    /usr/include/tinyxml2.h  /usr/include/tinyxml.h

I also found libtinyxml2.so in /usr/lib/...

I don't know where TINYXML2_SOURCE_DIR is set, what its value should be and in which path variable it should be included.

Ed C. gravatar imageEd C. ( 2019-07-29 10:49:23 -0500 )edit

I got MicroXRCEAgenet to build using these instructions. Installing the Agent stand-alone

I had to add library paths and ignore a tinyxml2 library not found error in cmake. MicroXRCEAgent executes so I can now test it with the OpenCR board. I'll provide details in the Answer section later.

Hopefully, the Bashing install package will become available like it is for Crystal so we don't have to do a source build.

The instructions I was using were from the section 15.1.2 for Raspbian SBC setup for Raspberry Pi in the TB3 emanual (bullet 3 Follow instruction that ...). I should have known they would be different on Ubuntu.

Ed C. gravatar imageEd C. ( 2019-07-29 14:44:57 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-07-27 21:25:54 -0500

Seen: 75 times

Last updated: Jul 29