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
I had some difficulties following the README instructions on how to run ogma for ROS 2 applications.
The Dockerfile can be used to compile the application inside the base image for the Space ROS distribution.
It would be useful to make it explicit that you are referring to this Dockerfile. Took me a while to figure it out.
To build the image, first place the core implementation of the monitors in C inside the directory ros_demo/copilot/src/ (see 'Current limitations' for details).
ghci
GHCi, version 8.8.4: https://www.haskell.org/ghc/ :?forhelp
Loaded package environment from /home/gus/.ghc/x86_64-linux-8.8.4/environments/default
Prelude> :set -package copilot-c99
package flags have changed, resetting and loading new packages...
Prelude> :set -package copilot-language
package flags have changed, resetting and loading new packages...
Prelude> :l ROS.hs
[1 of 1] Compiling Main ( ROS.hs, interpreted )
Ok, one module loaded.
*Main> :main
I moved the monitor.c, monitor.h and monitor_types.h files to ogma-core/templates/ros/copilot/src. Then, I tried building the Dockerfile but I get the following error:
=> ERROR [6/6] RUN source /opt/spaceros/install/setup.bash && 7.0s
------
> [6/6] RUN source /opt/spaceros/install/setup.bash && colcon build:
1.085 Starting >>> copilot
6.770 --- stderr: copilot
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:24:1: error: expected unqualified-id before ‘{’ token
6.770 24 | {{{variablesS}}}
6.770 | ^
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:32:1: error: expected unqualified-id before ‘{’ token
6.770 32 | {{{msgHandlerInClassS}}}
6.770 | ^
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:40:1: error: expected unqualified-id before ‘{’ token
6.770 40 | {{{msgCallbacks}}}
6.770 | ^
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:41:1: error: expected unqualified-id before ‘{’ token
6.770 41 | {{{msgSubscriptionDeclrs}}}
6.770 | ^
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:42:1: error: expected unqualified-id before ‘{’ token
6.770 42 | {{{msgPublisherDeclrs}}}
6.770 | ^
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp: In constructor ‘CopilotRV::CopilotRV()’:
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:28:4: error: ‘msgSubscriptionS’ was not declared in this scope; did you mean ‘rmw_subscription_s’?
6.770 28 | {{{msgSubscriptionS}}}
6.770 | ^~~~~~~~~~~~~~~~
6.770 | rmw_subscription_s
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:29:4: error: ‘msgPublisherS’ was not declared in this scope; did you mean ‘rmw_publisher_s’?
6.770 29 | {{{msgPublisherS}}}
6.770 | ^~~~~~~~~~~~~
6.770 | rmw_publisher_s
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp: At global scope:
6.770 /home/spaceros-user/monitors/src/copilot/src/copilot_monitor.cpp:45:1: error: expected unqualified-id before ‘{’ token
6.770 45 | {{{msgHandlerGlobalS}}}
6.770 | ^
6.770 gmake[2]: *** [CMakeFiles/copilot.dir/build.make:76: CMakeFiles/copilot.dir/src/copilot_monitor.cpp.o] Error 1
6.770 gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/copilot.dir/all] Error 2
6.770 gmake: *** [Makefile:146: all] Error 2
6.770 ---
6.770 Failed <<<copilot [5.69s, exited with code 2]
6.848
6.848 Summary: 0 packages finished [6.01s]
6.848 1 package failed: copilot
6.848 1 package had stderr output: copilot
------
Dockerfile:15
--------------------
14 | WORKDIR ${PACKAGE_PATH}
15 | >>> RUN source /opt/spaceros/install/setup.bash && \
16 | >>> colcon build
17 |
--------------------
ERROR: failed to solve: process "/bin/bash -c source /opt/spaceros/install/setup.bash && colcon build" did not complete successfully: exit code: 2
The text was updated successfully, but these errors were encountered:
Hello,
I had some difficulties following the README instructions on how to run ogma for ROS 2 applications.
It would be useful to make it explicit that you are referring to this Dockerfile. Took me a while to figure it out.
Where is the ros_demo directory? I couldn't find it. I assumed you meant this directory
ogma-core/templates/ros/copilot/src
Also, is there a working example to help me understand how it works?
I found this example
ogma-cli/examples/ros-copilot/
but I couldn't get it work.I generated the monitor code with:
I moved the
monitor.c
,monitor.h
andmonitor_types.h
files toogma-core/templates/ros/copilot/src
. Then, I tried building the Dockerfile but I get the following error:The text was updated successfully, but these errors were encountered: