esteve / ros2_pepper

Scripts for cross-compiling ROS and ROS2 for Softbank's Pepper
Apache License 2.0
32 stars 22 forks source link

Error running ros2 commands and programs in Pepper #20

Open lbajo opened 6 years ago

lbajo commented 6 years ago

Hello @esteve , I was working in this repository and I did some changes from your original repository. All my changes are in this repository. Finally, all the scripts compiled but when I try to run some tests in 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

Do you think 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!

fmrico commented 6 years ago

Hi @lbajo

Maybe you could also make this question in ROS Answers. There is a tag ros2 and it seems to be a general question instead of a specific one related only to this project...

... or maybe not ;)