mirror of
https://github.com/micro-ROS/micro-ROS-Agent.git
synced 2026-09-06 09:55:15 +02:00
Feature/foxy migration (#30)
* Adding rosidl_cmake * Updated XML generation * Updated readme * Update README.md
This commit is contained in:
@@ -23,6 +23,7 @@ project(micro_ros_agent LANGUAGES CXX)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
find_package(microxrcedds_agent REQUIRED)
|
||||
find_package(rosidl_cmake REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME} src/main.cpp)
|
||||
|
||||
@@ -79,12 +80,11 @@ if(UROSAGENT_GENERATE_PROFILE)
|
||||
get_filename_component(_COLCON_CALL_DIR "${_COLCON_CALL_DIR}" DIRECTORY)
|
||||
|
||||
set(_PYTHON_SCRIPT_HEAD
|
||||
"
|
||||
import os\n
|
||||
import sys\n
|
||||
sys.path.append('${_OUTPUT_PATH}')\n
|
||||
from ${_PYTHON_PKG_TOOL} import *\n
|
||||
"
|
||||
"import os
|
||||
import sys
|
||||
sys.path.append('${_OUTPUT_PATH}')
|
||||
from ${_PYTHON_PKG_TOOL} import *
|
||||
"
|
||||
)
|
||||
|
||||
file(
|
||||
|
||||
@@ -164,21 +164,20 @@ def generate_XML(args):
|
||||
# Generate source file path
|
||||
src_file = os.path.join(srcs_dir, "%s_%s_%s.xml" % (spec.base_type.pkg_name, subfolder, spec.msg_name))
|
||||
|
||||
|
||||
# Data writer
|
||||
#file_content = " <dds>\n"
|
||||
file_content = " <data_writer profile_name=\"%s_%s_%s_p\">\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content = " <dds>\n"
|
||||
file_content += " <data_writer profile_name=\"%s_%s_%s_p\">\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <topic profile_name=\"%s_%s_%s_t\">\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <kind>NO_KEY</kind>\n"
|
||||
file_content += " <name>%s%s_%s_%s</name>\n" % (ros2_prefix, spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <dataType>%s::%s::dds_::%s_</dataType>\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " </topic>\n"
|
||||
file_content += " </data_writer>\n"
|
||||
#file_content += " </dds>\n"
|
||||
file_content += " </dds>\n"
|
||||
|
||||
|
||||
# Data reader
|
||||
#file_content += " <dds>\n"
|
||||
file_content += " <dds>\n"
|
||||
file_content += " <data_reader profile_name=\"%s_%s_%s_s\">\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <topic profile_name=\"%s_%s_%s_t\">\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <kind>NO_KEY</kind>\n"
|
||||
@@ -186,16 +185,16 @@ def generate_XML(args):
|
||||
file_content += " <dataType>%s::%s::dds_::%s_</dataType>\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " </topic>\n"
|
||||
file_content += " </data_reader>\n"
|
||||
#file_content += " </dds>\n"
|
||||
file_content += " </dds>\n"
|
||||
|
||||
|
||||
# Topic
|
||||
#file_content += " <dds>\n"
|
||||
file_content += " <dds>\n"
|
||||
file_content += " <topic profile_name=\"%s_%s_%s_t\">\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <name>%s%s_%s_%s</name>\n" % (ros2_prefix, spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " <dataType>%s::%s::dds_::%s_</dataType>\n" % (spec.base_type.pkg_name, subfolder, spec.msg_name)
|
||||
file_content += " </topic>\n"
|
||||
#file_content += " </dds>\n"
|
||||
file_content += " </dds>\n"
|
||||
|
||||
|
||||
# Write file content
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<buildtool_export_depend>ament_cmake</buildtool_export_depend>
|
||||
|
||||
<depend>microxrcedds_agent</depend>
|
||||
<depend>rosidl_cmake</depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
Reference in New Issue
Block a user