Closed Needrom closed 3 years ago
Which RTOS are you using? Which board are you using exactly? Which transport are you using?
Could you share the output of the micro-ROS Agent with a -v6
flag?
Thanks!
sorry about the the link below .It can't navigate to the project before.Now it could.So you can see I'm with a discovery board from china zhengdianyuanzi, and the RTOS and transport I'm use.
It can't run up yet.some initialization can't be finish. Don't know the mean about ouput with -v6
flag.
some bad new is the code is running to this.
/firmware/mcu_ws/uros/rmw_microxrcedds/rmw_microxrcedds_c/src/rmw_init.c
if (!uxr_init_udp_transport(
&context_impl->transport, &context_impl->udp_platform, ip_protocol,
context_impl->connection_params.agent_address, context_impl->connection_params.agent_port))
{
RMW_SET_ERROR_MSG("Can not create an udp connection");
return RMW_RET_ERROR;
}
but I'm in the serial mode not udp.
Recently we have changed the approach of the transports. Please check this: https://github.com/Needrom/Microros-on-DIscovery-board/pull/2
I have not built it and maybe you need to change something, but this is the new way of using serial transports in micro-ROS.
Don't hesitate to ask anything if you have any more doubts.
OK
with some error output it seem it didn't choose a rigth Transport mode
--- stderr: rcutils
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_get_cwd':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:60:24: warning: unused parameter 'buffer' [-Wunused-parameter]
rcutils_get_cwd(char * buffer, size_t max_length)
~~~~~~~^~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:60:39: warning: unused parameter 'max_length' [-Wunused-parameter]
rcutils_get_cwd(char * buffer, size_t max_length)
~~~~~~~^~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_is_directory':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:83:35: warning: unused parameter 'abs_path' [-Wunused-parameter]
rcutils_is_directory(const char * abs_path)
~~~~~~~~~~~~~^~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_is_file':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:102:30: warning: unused parameter 'abs_path' [-Wunused-parameter]
rcutils_is_file(const char * abs_path)
~~~~~~~~~~~~~^~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_exists':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:121:29: warning: unused parameter 'abs_path' [-Wunused-parameter]
rcutils_exists(const char * abs_path)
~~~~~~~~~~~~~^~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_is_readable':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:136:34: warning: unused parameter 'abs_path' [-Wunused-parameter]
rcutils_is_readable(const char * abs_path)
~~~~~~~~~~~~~^~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_is_writable':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:158:34: warning: unused parameter 'abs_path' [-Wunused-parameter]
rcutils_is_writable(const char * abs_path)
~~~~~~~~~~~~~^~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_is_readable_and_writable':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:180:47: warning: unused parameter 'abs_path' [-Wunused-parameter]
rcutils_is_readable_and_writable(const char * abs_path)
~~~~~~~~~~~~~^~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_mkdir':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:257:13: warning: implicit declaration of function 'mkdir' [-Wimplicit-function-declaration]
int ret = mkdir(abs_path, 0775);
^~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_calculate_directory_size':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:267:47: warning: unused parameter 'directory_path' [-Wunused-parameter]
rcutils_calculate_directory_size(const char * directory_path, rcutils_allocator_t allocator)
~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:267:83: warning: unused parameter 'allocator' [-Wunused-parameter]
rcutils_calculate_directory_size(const char * directory_path, rcutils_allocator_t allocator)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c: In function 'rcutils_get_file_size':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/filesystem.c:325:36: warning: unused parameter 'file_path' [-Wunused-parameter]
rcutils_get_file_size(const char * file_path)
~~~~~~~~~~~~~^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c: In function 'rcutils_get_env_var_zero_or_one':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c:127:35: warning: unused parameter 'zero_semantic' [-Wunused-parameter]
const char * name, const char * zero_semantic,
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c:128:16: warning: unused parameter 'one_semantic' [-Wunused-parameter]
const char * one_semantic)
~~~~~~~~~~~~~^~~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c: In function 'rcutils_logging_console_output_handler':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c:797:35: warning: implicit declaration of function 'isatty' [-Wimplicit-function-declaration]
# define IS_STREAM_A_TTY(stream) (isatty(fileno(stream)) != 0)
^~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c:807:22: note: in expansion of macro 'IS_STREAM_A_TTY'
is_colorized = IS_STREAM_A_TTY(g_output_stream); \
^~~~~~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/logging.c:928:3: note: in expansion of macro 'IS_OUTPUT_COLORIZED'
IS_OUTPUT_COLORIZED(is_colorized)
^~~~~~~~~~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/process.c: In function 'rcutils_get_pid':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/process.c:51:15: warning: implicit declaration of function 'getpid'; did you mean 'getw'? [-Wimplicit-function-declaration]
return (int)getpid();
^~~~~~
getw
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c: In function 'rcutils_load_shared_library':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:63:30: warning: unused parameter 'lib' [-Wunused-parameter]
rcutils_shared_library_t * lib,
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:64:16: warning: unused parameter 'library_path' [-Wunused-parameter]
const char * library_path,
~~~~~~~~~~~~~^~~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:65:23: warning: unused parameter 'allocator' [-Wunused-parameter]
rcutils_allocator_t allocator)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c: In function 'rcutils_get_symbol':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:118:23: warning: implicit declaration of function 'dlsym' [-Wimplicit-function-declaration]
void * lib_symbol = dlsym(lib->lib_pointer, symbol_name);
^~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:118:23: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:119:18: warning: implicit declaration of function 'dlerror'; did you mean 'perror'? [-Wimplicit-function-declaration]
char * error = dlerror();
^~~~~~~
perror
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:119:18: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c: In function 'rcutils_has_symbol':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:156:23: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
void * lib_symbol = dlsym(lib->lib_pointer, symbol_name);
^~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:157:20: warning: comparison between pointer and integer
return dlerror() == NULL && lib_symbol != 0;
^~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c: In function 'rcutils_unload_shared_library':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:175:20: warning: implicit declaration of function 'dlclose'; did you mean 'pclose'? [-Wimplicit-function-declaration]
int error_code = dlclose(lib->lib_pointer);
^~~~~~~
pclose
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c: In function 'rcutils_get_platform_library_name':
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:198:16: warning: unused parameter 'buffer_size' [-Wunused-parameter]
unsigned int buffer_size,
~~~~~~~~~~~~~^~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/uros/rcutils/src/shared_library.c:199:8: warning: unused parameter 'debug' [-Wunused-parameter]
bool debug)
^
---
--- stderr: rosidl_runtime_c
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:15 (find_package)
---
--- stderr: rcl_logging_noop
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:15 (find_package)
---
--- stderr: rmw
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:21 (find_package)
---
--- stderr: rosidl_typesupport_microxrcedds_c
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_runtime_c/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_runtime_c/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake:41 (include)
CMakeLists.txt:22 (find_package)
---
--- stderr: rosidl_typesupport_c
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:21 (find_package)
---
--- stderr: builtin_interfaces
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rmw/share/rmw/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rmw/share/rmw/cmake/rmwConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_microxrcedds_c/share/rosidl_typesupport_microxrcedds_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_microxrcedds_c/share/rosidl_typesupport_microxrcedds_c/cmake/rosidl_typesupport_microxrcedds_cConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_c/share/rosidl_typesupport_c/cmake/rosidl_typesupport_c-extras.cmake:13 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_c/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_default_generators/share/rosidl_default_generators/cmake/rosidl_default_generators-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_default_generators/share/rosidl_default_generators/cmake/rosidl_default_generatorsConfig.cmake:41 (include)
CMakeLists.txt:14 (find_package)
---
--- stderr: libyaml_vendor
CMake Warning (dev) at CMakeLists.txt:55 (add_library):
ADD_LIBRARY called with SHARED option but the target platform does not
support dynamic linking. Building a STATIC library instead. This may lead
to problems.
This warning is for project developers. Use -Wno-dev to suppress it.
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/api.c: In function 'yaml_strdup':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/api.c:66:27: warning: implicit declaration of function 'strdup'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
return (yaml_char_t *)strdup((char *)str);
^~~~~~
strcmp
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/api.c: In function 'yaml_document_delete':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/api.c:1121:7: warning: variable 'context' set but not used [-Wunused-but-set-variable]
} context;
^~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c: In function 'yaml_emitter_write_plain_scalar':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:28:6: warning: value computed is not used [-Wunused-value]
&& ((emitter->line_break == YAML_CR_BREAK ? \
^~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:56:11: note: in expansion of macro 'PUT_BREAK'
(PUT_BREAK(emitter), \
^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:1931:18: note: in expansion of macro 'WRITE_BREAK'
if (!WRITE_BREAK(emitter, string)) return 0;
^~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c: In function 'yaml_emitter_write_single_quoted_scalar':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:28:6: warning: value computed is not used [-Wunused-value]
&& ((emitter->line_break == YAML_CR_BREAK ? \
^~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:56:11: note: in expansion of macro 'PUT_BREAK'
(PUT_BREAK(emitter), \
^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:1988:18: note: in expansion of macro 'WRITE_BREAK'
if (!WRITE_BREAK(emitter, string)) return 0;
^~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c: In function 'yaml_emitter_write_literal_scalar':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:28:6: warning: value computed is not used [-Wunused-value]
&& ((emitter->line_break == YAML_CR_BREAK ? \
^~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:56:11: note: in expansion of macro 'PUT_BREAK'
(PUT_BREAK(emitter), \
^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:2251:18: note: in expansion of macro 'WRITE_BREAK'
if (!WRITE_BREAK(emitter, string)) return 0;
^~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c: In function 'yaml_emitter_write_folded_scalar':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:28:6: warning: value computed is not used [-Wunused-value]
&& ((emitter->line_break == YAML_CR_BREAK ? \
^~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:56:11: note: in expansion of macro 'PUT_BREAK'
(PUT_BREAK(emitter), \
^~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/emitter.c:2300:18: note: in expansion of macro 'WRITE_BREAK'
if (!WRITE_BREAK(emitter, string)) return 0;
^~~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c: In function 'yaml_parser_parse_block_sequence_entry':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c:762:21: warning: variable 'dummy_mark' set but not used [-Wunused-but-set-variable]
yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */
^~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c: In function 'yaml_parser_parse_block_mapping_key':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c:872:21: warning: variable 'dummy_mark' set but not used [-Wunused-but-set-variable]
yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */
^~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c: In function 'yaml_parser_parse_flow_sequence_entry':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c:955:17: warning: variable 'dummy_mark' set but not used [-Wunused-but-set-variable]
yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */
^~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c: In function 'yaml_parser_parse_flow_mapping_key':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/parser.c:1107:17: warning: variable 'dummy_mark' set but not used [-Wunused-but-set-variable]
yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */
^~~~~~~~~~
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/scanner.c: In function 'yaml_parser_decrease_flow_level':
/home/mego-ros2/microros_ws/firmware/mcu_ws/build/libyaml_vendor/libyaml-10c9078-prefix/src/libyaml-10c9078/src/scanner.c:1189:23: warning: variable 'dummy_key' set but not used [-Wunused-but-set-variable]
yaml_simple_key_t dummy_key; /* Used to eliminate a compiler warning. */
^~~~~~~~~
---
--- stderr: micro_ros_msgs
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rmw/share/rmw/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rmw/share/rmw/cmake/rmwConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_microxrcedds_c/share/rosidl_typesupport_microxrcedds_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_microxrcedds_c/share/rosidl_typesupport_microxrcedds_c/cmake/rosidl_typesupport_microxrcedds_cConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_c/share/rosidl_typesupport_c/cmake/rosidl_typesupport_c-extras.cmake:13 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_typesupport_c/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cConfig.cmake:41 (include)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_default_generators/share/rosidl_default_generators/cmake/rosidl_default_generators-extras.cmake:21 (find_package)
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rosidl_default_generators/share/rosidl_default_generators/cmake/rosidl_default_generatorsConfig.cmake:41 (include)
CMakeLists.txt:20 (find_package)
---
--- stderr: rmw_microxrcedds
CMake Warning at /home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/mego-ros2/microros_ws/firmware/mcu_ws/install/rcutils/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:27 (find_package)
CMake Error at CMakeLists.txt:93 (message):
Transport not supported. Use "serial", "udp", "custom"
---
Failed <<< rmw_microxrcedds [0.64s, exited with code 1]
make: *** [Makefile:334: colcon_compile] Error 1
it seem to configure with UART not UART1, even though I use the -d 1
option.
ros2 run micro_ros_setup configure_firmware.sh ping_pong -t serial -d 1
echo test
/home/mego-ros2/microros_ws/install/micro_ros_setup
Configuring firmware for freertos platform stm32MakefileTest
Using serial device USART.
Configured serial mode with agent at USART
Rebuild all from scratch, create a new micro_ros_setup workspace.
tough way to rebuild when I try to create the firmware again. The last time a create the firmware I try for multiple time to get it done. If anything a I should know before I create the firmware so I can make it easy.
Creating firmware for freertos platform olimex-stm32-e407
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
Failed to download target platform data for gbpdistro:
<urlopen error timed out>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Add distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
ERROR: error loading sources list:
<urlopen error <urlopen error [Errno 0] Error> (https://raw.githubusercontent.com/ros/rosdistro/master/foxy/distribution.yaml)>
another question I have retarget my printf with to file which is /Core/Src/retarget.c and /Core/Inc/retarget.h. If this two file will affect project working not properly?
and what those line mean.
recreate the firmware was killing all time, not finish download every component yet.
Please check:
OK thanks
checking the other question for now. can't even rosdep update.Didn't know why.
Can you add an option which the micro_ros_setup create_firmware.sh can keep download git repo if it failed ? because if it failed I may delete the firmware and run it again.For my poor network.
Sorry, we have not planned to implement this feature, if you improve the micro-ROS build system, feel free to contribute with a PR.
OK, may be later. have to take some time to test it. But I just download it one by one to the firmware.and the environment not is working.
But the problem is still here. The code can get here ,at the line 208 in file freertos.c
for(;;)
209 {
210 printf("into the printf \r\n");
211 if (eTaskGetState(xHandle) != eSuspended && availableNetwork)
212 //if(1)
213 {
214 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_10, GPIO_PIN_SET);
215 osDelay(150);
216 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_10, GPIO_PIN_RESET);
217 osDelay(150);
218 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_9, GPIO_PIN_SET);
219 osDelay(150);
220 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_9, GPIO_PIN_RESET);
221 osDelay(150);
222 }
223 else {
224 // HAL_GPIO_WritePin(GPIOF, GPIO_PIN_10, GPIO_PIN_SET);
225 // osDelay(1000);
226 // HAL_GPIO_WritePin(GPIOF, GPIO_PIN_10, GPIO_PIN_RESET);
227 // osDelay(1000);
228 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_9, GPIO_PIN_SET);
229 osDelay(1000);
230 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_9, GPIO_PIN_RESET);
231 osDelay(1000);
232 }
233 }
and the led is right to blink.
but the appMain may not working. and the printf after the
osThreadNew(appMain, NULL, &attributes);
is disappear.
Check your stack, how many bytes have you configured for your main stack and for appMain stack?
Try to increase the attributes.stack_size
I may think 3 * 10000 is big enough. but still not working.
osThreadAttr_t attributes;
memset(&attributes, 0x0, sizeof(osThreadAttr_t));
attributes.name = "microROS_app";
attributes.stack_size = 3 * 10000;
attributes.priority = (osPriority_t)osPriorityNormal1;
printf("before appMain \r\n");
osThreadNew(appMain, NULL, &attributes);
Retarget_Init(&huart1);
osDelay(500);
char ptrTaskList[500];
vTaskList(ptrTaskList);
printf("**********************************\n");
printf("Task State Prio Stack Num\n");
printf("**********************************\n");
printf(ptrTaskList);
printf("**********************************\n");
And can you debug where is your micro-ROS app failing?
Sorry for learning openocd recently.No use it before
when I set the break after the while
here, like the break at 39, it seem to stuck in the while
30 UART_HandleTypeDef * uart = (UART_HandleTypeDef*) transport->args; │
│31 │
│32 HAL_StatusTypeDef ret; │
│33 if (uart->gState == HAL_UART_STATE_READY){ │
B+>│34 ret = HAL_UART_Transmit_DMA(uart, buf, len); │
│35 while (ret == HAL_OK && uart->gState != HAL_UART_STATE_READY){ │
│36 osDelay(1); │
│37 } │
│38 │
b+ │39 return (ret == HAL_OK) ? len : 0; │
│40 }else{ │
│41 return 0; │
│42 }
It seems that your serial transport is not sending data. Have you tried to send data over DMA? Have you changed any configuration related?
It seems that your serial transport is not sending data. Have you tried to send data over DMA? Have you changed any configuration related?
Actually B+>│34 ret = HAL_UART_Transmit_DMA(uart, buf, len);
this line will send a little bit.
in HEX
7E 00 00 18 00 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 06 C3 81 83 81 00 FC 01 6A B5
in Str
~€XRCE脕儊?j?
That's correct, this is the XRCE init frame. So if this is being sent over the serial the agent should answer with a "session ok" message.
The point is why is it hanging in the while (ret == HAL_OK && uart->gState != HAL_UART_STATE_READY)
?
That's correct, this is the XRCE init frame. So if this is being sent over the serial the agent should answer with a "session ok" message.
The point is why is it hanging in the
while (ret == HAL_OK && uart->gState != HAL_UART_STATE_READY)
?
Yes the state seem to stay in the HAL_UART_STATE_TX
Maybe you should review your serial device configuration because it should exit HAL_UART_STATE_TX
as soon as all bytes are sent.
Have you checked if the len
in this function is correct? The function should send len
bytes from buf
.
All serial device configuration is auto generate, some relate function which may change the serial option had comment.And the uart->gState
as usual.
and the len here is 31
33 if (uart->gState == HAL_UART_STATE_READY){ │
│34 ret = HAL_UART_Transmit_DMA(uart, buf, len); │
│35 while (ret == HAL_OK && uart->gState != HAL_UART_STATE_READY){ │
B+>│36 osDelay(1); │
│37 }
yeah thanks a lot .I fix that with add global interrupt for usart, and Then it won't stuck in the state of TX.
and it can connect now
Error output with appMain thread open.
with no idea of gdb in linux with openocd so I add some printf in code to detect where the code had ran.
printf output.
It mean the code run into appMain and stop at this line
and finally it stop here ./mcu_ws/uros/rclc/rclc/src/rclc/init.c
the change I had make.
firmware/mcu_ws/uros/rclc/rclc/src/rclc/init.c
firmware/mcu_ws/uros/rclc/rclc/src/rclc/init.c