Skip to content

Build error with newer commit due to RANDOM::ENGINE template issue #4

Description

@coasho

I wanted to report an issue with building the PX4 module using a more recent commit.
Working setup

git clone https://github.com/rl-tools/rl-tools.git rl_tools
cd /rl_tools
git checkout aecd4d9e6087abb4aa48e7a489b53d4061577032
git submodule update --init --recursive embedded_platforms/px4
cd embedded_platforms/px4/
git checkout dd78b46723c2cd32e8f1fa8a74c4eacffa44f72b
git submodule update --init --force --recursive
# Replace model.h
cd px4_autopilot/
make mro_pixracerpro_default EXTERNAL_MODULES_LOCATION=$(cd .. && cd external_modules && pwd) RL_TOOLS_ROOT=$(cd ../../../ && pwd) -j8

The above setup works successfully.
Error with newer commit

cd ../
git checkout a65e35fa283f19cd9b5a31da2742313a768d343e
git submodule update --init --force --recursive
cd px4_autopilot/
make mro_pixracerpro_default EXTERNAL_MODULES_LOCATION=$(cd .. && cd external_modules && pwd) RL_TOOLS_ROOT=$(cd ../../../ && pwd) -j8

I encounter this error:

/rl_tools/embedded_platforms/px4/external_modules/src/modules/rl_tools_policy/RLtoolsPolicy.hpp:114:24: error: 'ENGINE' in 'using RANDOM = struct rl_tools::devices::random::ARM' {aka 'struct rl_tools::devices::random::ARM'} does not name a template type
  114 |  DEVICE::SPEC::RANDOM::ENGINE<> rng;

It seems the older commit aecd4d9e6087abb4 is outdated, but works correctly with the PX4 module. Could the documentation be updated to reflect which commits are compatible, or to fix the template issue in newer versions?
Thank you for your time and for maintaining this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions