Skip to content

Modifications to run microROS on NuttX RTOS #31

@robertobucher

Description

@robertobucher

Issue template

microROS on NuttX target runs correctly again, but there are some corrections required to correctly compile the example.

  • Hardware description: nucelo-144 board
  • RTOS: NuttX
  • Installation type: microROS for NuttX (this example)
  • Version or commit hash: galactic

Steps to reproduce the issue

The file micro_ros_src/src/rcutils/src/filesystem.c contains a redefinition of "DIR" (which is already defined in the dirent.h" file in NuTTX).

A test is required such

#ifdef DIR or #ifndef DIR....

Expected behavior

the nuttx application compile again

Actual behavior

There is the error about redefining DIR. To get the compilaton correctly I've commented the line

#ifdef RCUTILS_NO_FILESYSTEM
//typedef int DIR; <=======
#endif // _RCUTILS_NO_FILESYSTEM
typedef struct rcutils_dir_iter_state_t
{
#ifdef _WIN32
HANDLE handle;
WIN32_FIND_DATA data;
#else
DIR * dir;
#endif
} rcutils_dir_iter_state_t;

but it is not the correct solution.

Additional information

I've modified also the microros_main.c file in the microros/example_app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions