custom package build fails (micro-ROS)
This is NOT a duplicate question, please don't just close this topic. Provide some insight to where "the supposedly" duplicate question can be found. I have been looking through here to see if there are any similar questions, that might help solving the issues I'm facing. However, I wasn't able to find anything.
I'm building a custom package with custom message, based on oled_display_node
VS Code + PlatformIO building microros
before attempting I clean the environment, as so:
1. pio run --target clean_microros
2. platformIO: Clean (little trash-bin icon)
3. delete the .pio directory
Then I build as per below:
1. pio init
2. pio lib install
3. pio run
I have created the
DisplayOutput.msg
with the following content:
# Request to place text on the display.
# The display row and column as well as string specifics are required
# A comment field is used to assist user debug
# actionType values
uint8 DISPLAY_ALL=1 # Message to fill entire display
uint8 DISPLAY_SUBSTRING=2 # Message for a set of characters on one line
uint8 DISPLAY_STARTUP_STRING= 3 # Reserved for future use for non-volatile startup string
uint8 DISPLAY_SET_BRIGHTNESS= 4 # Sets display brightness. attributes is the brightness
int32 actionType # The type of action to be taken. See MSG_DISPLAY for values
int32 row # The display row of characters for this message
# row can be from 0 to 7 where 0 is top line
int32 column # The starting horizontal pixel column
# The column can be 0 - 118 where 0 is start at the left
int32 numChars # Number of characters to go to the display
int32 attributes # Used for brightness level
string text # The text for this display update. Up to 15 characters
string comment # Optional comment the user can use to document purpose
However, when I un-comment this line
"msg/DisplayOutput.msg"
inside my CMakeList.txt the compiler throws an error. (trace below)
CMakeList.txt cmake_minimum_required(VERSION 3.8) project(teensy_interfaces)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
# -----------------------------
find_package(geometry_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/Num.msg"
"msg/Sphere.msg"
"msg/Bool.msg"
"msg/Int64.msg"
"msg/String.msg"
"msg/Int32.msg"
"msg/UInt8.msg"
"msg/DisplayOutput.msg"
"srv/AddThreeInts.srv"
"srv/NeoPixelControl.srv"
"srv/OledDisplay.srv"
DEPENDENCIES geometry_msgs std_msgs # Add packages that above messages depend on, in this case geometry_msgs for Sphere.msg
)
# -----------------------------
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()
package.xml
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>teensy_interfaces</name>
<version>0.0.1< ...
I've just checked, and #q411518, #q411519, #q411521 and #q411523 all appear to be the same question. If that's not the case, please clarify, and we can re-open the ones that are not duplicates.
And please note: #q411519 is still open, so technically, you've posted another duplicate with this question.
they are duplicates of your own question, posted multiple times. Probably due to a glitch in Askbot. You could check your account's activity to see for yourself.
In those cases we don't link to the other duplicates. They just get closed.
I didn't see that, but I recall there were some glitches posting and it came up with an error a few times, until I cut the length in half, then edited the post.
That's alright.
Seeing as this one now has an answer by @Pablogs, I suggest you close and delete the remaining duplicate now (ie: #q411519).