error running ros2 examples inside Pepper robot

asked 2018-11-06 04:13:55 -0600

lobare gravatar image

Hello, I compiled ros2 code so when I try to run some examples of ros2 inside the Pepper robot I have the next errors:

Pepper [0] ~ $ ros2 topic pub /chatter std_msgs/String "data: Hello world"
[RTPS_QOS_CHECK Error] WRITERQOS: LeaseDuration <= announcement period. -> Function checkQos
Failed to create publisher: create_publisher() could not create publisher, at /home/nao/pepper_ros2_ws/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_publisher.cpp:145, at /home/nao/pepper_ros2_ws/src/ros2/rcl/rcl/src/rcl/publisher.c:151

Pepper [err 1] ~ $ ros2 run demo_nodes_cpp talker
[RTPS_QOS_CHECK Error] WRITERQOS: LeaseDuration <= announcement period. -> Function checkQos
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
  what():  could not create publisher: create_publisher() could not create publisher, at /home/nao/pepper_ros2_ws/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_publisher.cpp:145, at /home/nao/pepper_ros2_ws/src/ros2/rcl/rcl/src/rcl/publisher.c:151

Pepper [err 250] ~ $ ros2 run demo_nodes_cpp listener
[RTPS_QOS_CHECK Error] WRITERQOS: LeaseDuration <= announcement period. -> Function checkQos
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
  what():  could not create publisher: create_publisher() could not create publisher, at /home/nao/pepper_ros2_ws/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_publisher.cpp:145, at /home/nao/pepper_ros2_ws/src/ros2/rcl/rcl/src/rcl/publisher.c:151

Pepper [err 250] ~ $ ros2 run demo_nodes_py talker  
[RTPS_QOS_CHECK Error] WRITERQOS: LeaseDuration <= announcement period. -> Function checkQos
Traceback (most recent call last):
  File "/home/nao/System/ros2_inst/demo_nodes_py/lib/demo_nodes_py/talker", line 11, in <module>
    load_entry_point('demo-nodes-py==0.4.0', 'console_scripts', 'talker')()
  File "/data/home/nao/System/ros2_inst/demo_nodes_py/lib/python3.6/site-packages/demo_nodes_py/topics/talker.py", line 46, in main
    node = Talker()
  File "/data/home/nao/System/ros2_inst/demo_nodes_py/lib/python3.6/site-packages/demo_nodes_py/topics/talker.py", line 28, in __init__
    self.pub = self.create_publisher(String, 'chatter')
  File "/home/nao/System/ros2_inst/rclpy/lib/python3.6/site-packages/rclpy/node.py", line 115, in create_publisher
    self.handle, msg_type, topic, qos_profile.get_c_qos_profile())
RuntimeError: Failed to create publisher: create_publisher() could not create publisher, at /home/nao/pepper_ros2_ws/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_publisher.cpp:145, at /home/nao/pepper_ros2_ws/src/ros2/rcl/rcl/src/rcl/publisher.c:151

Is possible that the problem are the different versions of the repositories? Are some repository version wrong? Is something related with the Fast-RTPS QoS? Any idea about what is happening?

Thanks!

edit retag flag offensive close merge delete