i'm running an agent with docker. sudo docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v6
I have a publisher code, I'm running this code with python. I'm waiting for the data I put on the Arduino to arrive.
Actual behavior
I'm getting error from Arduino "/home/mina/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gcc" -mcpu=cortex-m3 -mthumb -Os -Wl,--gc-sections "-T/home/mina/.arduino15/packages/arduino/hardware/sam/1.6.12/variants/arduino_due_x/linker_scripts/gcc/flash.ld" "-Wl,-Map,/tmp/arduino_build_390385/basic.ino.ino.map" -o "/tmp/arduino_build_390385/basic.ino.ino.elf" "-L/tmp/arduino_build_390385" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid "/tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o" "/tmp/arduino_build_390385/libraries/micro_ros_arduino-2.0.7-humble/default_transport.cpp.o" "/tmp/arduino_build_390385/libraries/micro_ros_arduino-2.0.7-humble/native_ethernet_transport.cpp.o" "/tmp/arduino_build_390385/libraries/micro_ros_arduino-2.0.7-humble/wifi_transport.cpp.o" "/tmp/arduino_build_390385/core/variant.cpp.o" "/home/mina/.arduino15/packages/arduino/hardware/sam/1.6.12/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a" "/tmp/arduino_build_390385/../arduino_cache_577918/core/core_arduino_sam_arduino_due_x_7e293e264b1e0312c8d5597ef3b45ebf.a" -Wl,--end-group -lm -lgcc /tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o: In functionloop':
/home/mina/Arduino/basic.ino/basic.ino.ino:54: undefined reference to rclc_executor_spin_some' /tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o: In functionset_microros_transports':
/home/mina/Arduino/libraries/micro_ros_arduino-2.0.7-humble/src/micro_ros_arduino.h:40: undefined reference to rmw_uros_set_custom_transport' /tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o: In functionsetup':
/home/mina/Arduino/basic.ino/basic.ino.ino:33: undefined reference to rclc_support_init' /home/mina/Arduino/basic.ino/basic.ino.ino:36: undefined reference torclc_node_init_default'
/home/mina/Arduino/basic.ino/basic.ino.ino:43: undefined reference to rosidl_typesupport_c__get_message_type_support_handle__std_msgs__msg__Float32' /home/mina/Arduino/basic.ino/basic.ino.ino:43: undefined reference torclc_subscription_init_default'
/home/mina/Arduino/basic.ino/basic.ino.ino:46: undefined reference to rclc_executor_init' /home/mina/Arduino/basic.ino/basic.ino.ino:47: undefined reference torclc_executor_add_subscription'
collect2: error: ld returned 1 exit status
Using library micro_ros_arduino-2.0.7-humble at version 2.0.7-humble in folder: /home/mina/Arduino/libraries/micro_ros_arduino-2.0.7-humble
exit status 1
Error compiling for board Arduino Due (Native USB Port).`
Additional information
My python code =
`
import rclpy
from rclpy.node import Node
from std_msgs.msg import Float32
class MinimalPublisher(Node):
def __init__(self):
super().__init__('minimal_publisher')
self.publisher_ = self.create_publisher(Float32, 'topic', 10)
timer_period = 0.5 # seconds
self.timer = self.create_timer(timer_period, self.timer_callback)
self.i = 0
def timer_callback(self):
msg = Float32()
msg.data = 4.1
self.publisher_.publish(msg)
self.get_logger().info('Publishing: "%s"' % msg.data)
self.i += 1
def main(args=None):
rclpy.init(args=args)
minimal_publisher = MinimalPublisher()
rclpy.spin(minimal_publisher)
# Destroy the node explicitly
# (optional - otherwise it will be done automatically
# when the garbage collector destroys the node object)
minimal_publisher.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()
Issue template
Steps to reproduce the issue
Expected behavior
i'm running an agent with docker.
sudo docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v6
I have a publisher code, I'm running this code with python. I'm waiting for the data I put on the Arduino to arrive.Actual behavior
I'm getting error from Arduino
"/home/mina/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gcc" -mcpu=cortex-m3 -mthumb -Os -Wl,--gc-sections "-T/home/mina/.arduino15/packages/arduino/hardware/sam/1.6.12/variants/arduino_due_x/linker_scripts/gcc/flash.ld" "-Wl,-Map,/tmp/arduino_build_390385/basic.ino.ino.map" -o "/tmp/arduino_build_390385/basic.ino.ino.elf" "-L/tmp/arduino_build_390385" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid "/tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o" "/tmp/arduino_build_390385/libraries/micro_ros_arduino-2.0.7-humble/default_transport.cpp.o" "/tmp/arduino_build_390385/libraries/micro_ros_arduino-2.0.7-humble/native_ethernet_transport.cpp.o" "/tmp/arduino_build_390385/libraries/micro_ros_arduino-2.0.7-humble/wifi_transport.cpp.o" "/tmp/arduino_build_390385/core/variant.cpp.o" "/home/mina/.arduino15/packages/arduino/hardware/sam/1.6.12/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a" "/tmp/arduino_build_390385/../arduino_cache_577918/core/core_arduino_sam_arduino_due_x_7e293e264b1e0312c8d5597ef3b45ebf.a" -Wl,--end-group -lm -lgcc /tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o: In function
loop': /home/mina/Arduino/basic.ino/basic.ino.ino:54: undefined reference torclc_executor_spin_some' /tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o: In function
set_microros_transports': /home/mina/Arduino/libraries/micro_ros_arduino-2.0.7-humble/src/micro_ros_arduino.h:40: undefined reference tormw_uros_set_custom_transport' /tmp/arduino_build_390385/sketch/basic.ino.ino.cpp.o: In function
setup': /home/mina/Arduino/basic.ino/basic.ino.ino:33: undefined reference torclc_support_init' /home/mina/Arduino/basic.ino/basic.ino.ino:36: undefined reference to
rclc_node_init_default' /home/mina/Arduino/basic.ino/basic.ino.ino:43: undefined reference torosidl_typesupport_c__get_message_type_support_handle__std_msgs__msg__Float32' /home/mina/Arduino/basic.ino/basic.ino.ino:43: undefined reference to
rclc_subscription_init_default' /home/mina/Arduino/basic.ino/basic.ino.ino:46: undefined reference torclc_executor_init' /home/mina/Arduino/basic.ino/basic.ino.ino:47: undefined reference to
rclc_executor_add_subscription' collect2: error: ld returned 1 exit status Using library micro_ros_arduino-2.0.7-humble at version 2.0.7-humble in folder: /home/mina/Arduino/libraries/micro_ros_arduino-2.0.7-humble exit status 1 Error compiling for board Arduino Due (Native USB Port).`Additional information
My python code = ` import rclpy from rclpy.node import Node
`
My Arduino code
`
include
`