micro-ROS / micro-ROS_crazyflie_demo

Provides a demo of micro-ROS based on a Crazyflie.
Apache License 2.0
18 stars 6 forks source link

Failed to build weather_agent #20

Closed meganetaaan closed 2 years ago

meganetaaan commented 2 years ago

Hello. I'm trying to use micro-ROS on RaspberryPi(buster v7) according to on the build instruction of this repository. But weather_agent fails to build. It looks fastcdr not found as the cmake log below. Is it necessary to get in advance?

Issue template

Steps to reproduce the issue

docker run -ti --rm microros/base:foxy

(got microros/base:foxy f386eff93b36)

sudo apt-get update && sudo apt-get install -y python3-nose # fix for "module not found" error
ros2 run micro_ros_setup create_firmware_ws.sh raspbian buster_v7
ros2 run micro_ros_setup configure_firmware.sh weather_agent
ros2 run micro_ros_setup build_firmware.sh 

Expected behavior

Actual behavior

I got an error below.

root@51d1bd891dcd:/uros_ws# ros2 run micro_ros_setup build_firmware.sh 
Crosscompiled environment: cleaning path
Building firmware for raspbian platform buster_v7
[0.272s] WARNING:colcon.colcon_core.package_discovery:the --packages-ignore-regex '.*_cpp' doesn't match any of the package names
Starting >>> microxrcedds_agent
--- stderr: microxrcedds_agent                                
Cloning into 'microxrcedds_client'...
Cloning into 'spdlog'...
Cloning into 'sanitizers'...
Already on 'master'
Switched to a new branch 'develop'
Cloning into 'microcdr'...
Note: switching to 'v1.2.2'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 21d3cfe Merge pull request #63 from eProsima/develop
Note: switching to 'v1.4.2'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 1549ff12 Replace STRING(PREPEND ..) in CMakeLists.txt to support older CMake versions
CMake Error at CMakeLists.txt:143 (find_package):
  By not providing "Findfastcdr.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "fastcdr", but
  CMake did not find one.

  Could not find a package configuration file provided by "fastcdr"
  (requested version 1) with any of the following names:

    fastcdrConfig.cmake
    fastcdr-config.cmake

  Add the installation prefix of "fastcdr" to CMAKE_PREFIX_PATH or set
  "fastcdr_DIR" to a directory containing one of the above files.  If
  "fastcdr" provides a separate development package or SDK, be sure it has
  been installed.

make[2]: *** [CMakeFiles/uagent.dir/build.make:113: uagent-prefix/src/uagent-stamp/uagent-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/uagent.dir/all] Error 2
make: *** [Makefile:87: all] Error 2
---
Failed   <<< microxrcedds_agent [17.5s, exited with code 2]

Summary: 0 packages finished [17.7s]
  1 package failed: microxrcedds_agent
  1 package had stderr output: microxrcedds_agent
  1 package not processed

Additional information

pablogs9 commented 2 years ago

@Acuadros95 can you take a look on that?

Acuadros95 commented 2 years ago

This PR fixes the problem: https://github.com/micro-ROS/raspbian_apps/pull/17

Anyway, you should use agent_lite instead of weather_agent, as this last one is a customized agent intended to be used on the crazyflie demo.

meganetaaan commented 2 years ago

Thank you for your quick reply! I successfully built weather_agent.

Anyway, you should use agent_lite instead of weather_agent, as this last one is a customized agent intended to be used on the crazyflie demo.

I'll also try agent_lite. Thanks again!