Compiler error
Closed this issue · 6 comments
Hi
When I compile it I will get following erros :
~/ros2_ws$ colcon build --cmake-args -DTHIRDPARTY=ON --packages-select firos2
Starting >>> firos2
[Processing: firos2]
--- stderr: firos2
In file included from /home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.cpp:26:0:
/home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.h:42:53: error: ‘SerializedPayload_t’ has not been declared
eProsima_user_DllExport bool serialize(void *data, SerializedPayload_t *payload);
^~~~~~~~~~~~~~~~~~~
/home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.h:43:43: error: ‘SerializedPayload_t’ has not been declared
eProsima_user_DllExport bool deserialize(SerializedPayload_t *payload, void *data);
^~~~~~~~~~~~~~~~~~~
/home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.h:45:50: error: ‘InstanceHandle_t’ has not been declared
eProsima_user_DllExport bool getKey(void *data, InstanceHandle_t *ihandle);
^~~~~~~~~~~~~~~~
/home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.cpp:40:44: error: ‘SerializedPayload_t’ has not been declared
bool TestPubSubType::serialize(void *data, SerializedPayload_t *payload) {
^~~~~~~~~~~~~~~~~~~
/home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.cpp: In member function ‘bool TestPubSubType::serialize(void*, int*)’:
/home/golizheh/ros2_ws/src/ros2/firos2/test/TestPubSubTypes.cpp:42:60: error: request for member ‘data’ in ‘* payload’, which is of non-class type ‘int’
eprosima::fastcdr::FastBuffer fastbuffer((char*) payload->data, payload->max_size); // Object that manages the raw buffer.
.
.
.
.
Thanks and look forward to hearing from you
Hi @golizheh
Seems that colcon is being unable to locate Fast-RTPS. Did you execute the 'install/local_setup.shscript before the
colcon buildcommand? If so, try adding
fastrtps` to the packages select.
Hi @LuisGP
Thanks for your answer,
Could you please explain a little more adding Fastrtps to command?
I have run follwoing command:
colcon build --cmake-args -DTHIRDPARTY=ON --packages-select firos2 Fast-RTPS
I have FAST RTPS on my /ros2_ws/src/eProsima
But it is seems like it is ignoring to run WARNING:colcon.colcon_core.package_selection:ignoring unknown package 'Fast-RTPS' in --packages-select.
Should I install and run something before?
Try the following:
colcon build --cmake-args -DTHIRDPARTY=ON --packages-select firos2 fastrtps
Unfortunately same error:
:~/ros2_ws$ colcon build --cmake-args -DTHIRDPARTY=ON --packages-select firos2 fastrtps
Starting >>> fastrtps
Finished <<< fastrtps [8.36s]
Starting >>> firos2
[Processing: firo
---
Failed <<< firos2 [ Exited with code 2 ]
Summary: 1 package finished [1min 10s]
1 package failed: firos2
1 package had stderr output: firos2
Hi @golizheh,
The most updated branch of FIROS2 (feature/TCP_DynTypes) is from December 2018 so the last supported ROS2 version is Crystal.
I tested that branch with Crystal and it compiles successfully.
We will merge feature/TCP_DynTypes into master and we will update the README.
Sorry for the inconvenience.