dora icon indicating copy to clipboard operation
dora copied to clipboard

latest main compile error

Open bobd988 opened this issue 1 year ago • 4 comments

The previous version worked fine but with the latest from main branch in same ubuntu 20l04

when running again this examle

 cargo run --example cxx-ros2-dataflow --features ros2-examples

I got

/home/demo/Public/dora/examples/c++-ros2-dataflow/node-rust-api/main.cc:23:28: error: no member named 'create_topic_geometry_msgs_Twist' in 'Ros2Node'
    auto vel_topic = node->create_topic_geometry_msgs_Twist("/turtle1", "cmd_vel", qos);
                     ~~~~  ^
/home/demo/Public/dora/examples/c++-ros2-dataflow/node-rust-api/main.cc:24:32: error: no member named 'create_publisher' in 'Ros2Node'
    auto vel_publisher = node->create_publisher(vel_topic, qos);
                         ~~~~  ^
/home/demo/Public/dora/examples/c++-ros2-dataflow/node-rust-api/main.cc:25:29: error: no member named 'create_topic_turtlesim_Pose' in 'Ros2Node'
    auto pose_topic = node->create_topic_turtlesim_Pose("/turtle1", "pose", qos);
                      ~~~~  ^
/home/demo/Public/dora/examples/c++-ros2-dataflow/node-rust-api/main.cc:26:36: error: no member named 'create_subscription' in 'Ros2Node'
    auto pose_subscription = node->create_subscription(pose_topic, qos, merged_events);
                             ~~~~  ^
/home/demo/Public/dora/examples/c++-ros2-dataflow/node-rust-api/main.cc:55:17: error: use of undeclared identifier 'geometry_msgs'
                geometry_msgs::Twist twist = {
                ^
5 errors generated.

bobd988 avatar Mar 29 '24 22:03 bobd988

DUP as #443

bobd988 avatar Mar 29 '24 22:03 bobd988

Issue #443 is about a SIGABRT error when running the ros2-service-server branch, which is not merged yet. So I don't think that this issue is related to it.

no member named 'create_topic_geometry_msgs_Twist' in 'Ros2Node'

This sounds like you maybe forgot to source your ROS2 installation before running the example?

phil-opp avatar Mar 30 '24 09:03 phil-opp

it is environment related. I will try another PC

bobd988 avatar Mar 30 '24 13:03 bobd988

Is the ros2 command available in the terminal where you run the example?

phil-opp avatar Mar 30 '24 14:03 phil-opp

Closing this as it seems solved and i'm unable to reproduce.

haixuanTao avatar Aug 31 '24 05:08 haixuanTao