You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ fastddsgen -version
openjdk version "11.0.21" 2023-10-17
OpenJDK Runtime Environment (build 11.0.21+9-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.21+9-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
fastddsgen version 3.2.1
OS: Ubuntu 22
Installation Type: apt, with vulcanexus-humble-fastddsgen. I want to use fastddsgen on the IDL file generated by a standard ROS humble installation.
Steps to reproduce
Create BasicTypes.idl
// generated from rosidl_adapter/resource/msg.idl.em
// with input from rosidl_generator_tests/msg/BasicTypes.msg
// generated code does not contain a copyright notice
module rosidl_generator_tests {
module msg {
struct BasicTypes {
boolean bool_value;
octet byte_value;
uint8 char_value;float float32_value;double float64_value;
int8 int8_value;
uint8 uint8_value;
int16 int16_value;
uint16 uint16_value;
int32 int32_value;
uint32 uint32_value;
int64 int64_value;
uint64 uint64_value;
};
};
};
-- Configuring BasicTypes...
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/ryan/Dev/ros2_ws/src/rosidl/build/rosidl_generator_tests/rosidl_adapter/rosidl_generator_tests/msg/build
[ 14%] Building CXX object CMakeFiles/BasicTypes_lib.dir/BasicTypes.cxx.o
In file included from /home/ryan/Dev/ros2_ws/src/rosidl/build/rosidl_generator_tests/rosidl_adapter/rosidl_generator_tests/msg/BasicTypes.cxx:29:
/home/ryan/Dev/ros2_ws/src/rosidl/build/rosidl_generator_tests/rosidl_adapter/rosidl_generator_tests/msg/BasicTypes.h:32:10: fatal error: fastcdr/cdr/fixed_size_string.hpp: No such file or directory
32 | #include <fastcdr/cdr/fixed_size_string.hpp>
Root cause
It might be finding the wrong version of fastcdr. It locates this one:
If I manually set my ROS_DISTRO to humble, which adjusts the CMake prefix path, then I get this error:
The file was found at
/opt/ros/humble/lib/cmake/fastcdr/fastcdr-config.cmake
CMake Error at CMakeLists.txt:13 (find_package):
Could not find a configuration file for package "fastrtps" that is
compatible with requested version "2.12".
The following configuration files were considered but not accepted:
/opt/ros/humble/share/fastrtps/cmake/fastrtps-config.cmake, version: 2.6.7
```
The text was updated successfully, but these errors were encountered:
Ryanf55
changed the title
Include error with CMake example
Include error with CMake example - <fastcdr/cdr/fixed_size_string.hpp>
Mar 5, 2024
This is because Fast DDS Gen v3 generates code using Fast CDR v2 API by default, but Vulcanexus is still distributing Fast CDR v1 (as ROS 2 does). Try this command:
fastddsgen -typeros2 -cdr both BasicTypes.idl -example CMake # -cdr v1 would also work
In case you're interested, we are in the process of upgrading Fast CDR to v2 for Jazzy in:
Bug Report
OS: Ubuntu 22
Installation Type: apt, with
vulcanexus-humble-fastddsgen
. I want to usefastddsgen
on the IDL file generated by a standard ROS humble installation.Steps to reproduce
cmake -S . -B build cmake --build build
Logs
Root cause
It might be finding the wrong version of fastcdr. It locates this one:
On my system, there's a ton of fastcdr config files:
If I manually set my ROS_DISTRO to humble, which adjusts the CMake prefix path, then I get this error:
The text was updated successfully, but these errors were encountered: