open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
225 stars 58 forks source link

Build error.. #98

Closed ruk-shan closed 2 years ago

ruk-shan commented 2 years ago
rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/MirrorManager.cpp: In member function ‘rmf_traffic::schedule::Database rmf_traffic_ros2::schedule::MirrorManager::fork() const’: /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/MirrorManager.cpp:593:26: error: ‘using element_type = class rmf_traffic::schedule::Mirror’ {aka ‘class rmf_traffic::schedule::Mirror’} has no member named ‘fork’ 593 return _pimpl->mirror->fork(); ^~~~ In file included from /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/internal_Node.hpp:59, from /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:18: /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/include/rmf_traffic_ros2/schedule/ParticipantRegistry.hpp:114:55: error: ‘Registration’ in ‘class rmf_traffic::schedule::Writer’ does not name a type 114 using Registration = rmf_traffic::schedule::Writer::Registration; ^~~~ /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/include/rmf_traffic_ros2/schedule/ParticipantRegistry.hpp:122:3: error: ‘Registration’ does not name a type 122 Registration add_or_retrieve_participant(ParticipantDescription description); ^~~~ In file included from /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:30: /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/include/rmf_traffic_ros2/schedule/ParticipantDescription.hpp:37:24: error: ‘ParticipantDescriptionsMap’ in namespace ‘rmf_traffic::schedule’ does not name a type; did you mean ‘ParticipantDescription’? 37 rmf_traffic::schedule::ParticipantDescriptionsMap convert( ^~~~~~ ParticipantDescription /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/include/rmf_traffic_ros2/schedule/ParticipantDescription.hpp:42:32: error: ‘ParticipantDescriptionsMap’ in namespace ‘rmf_traffic::schedule’ does not name a type; did you mean ‘ParticipantDescription’? 42 const rmf_traffic::schedule::ParticipantDescriptionsMap& from); ^~~~~~ ParticipantDescription /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp: In lambda function: /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:422:36: error: ‘ParticipantDescriptionsMap’ is not a member of ‘rmf_traffic::schedule’; did you mean ‘ParticipantDescription’? 422 rmf_traffic::schedule::ParticipantDescriptionsMap participants; ^~~~~~ ParticipantDescription make[2]: [CMakeFiles/rmf_traffic_ros2.dir/build.make:193: CMakeFiles/rmf_traffic_ros2.dir/src/rmf_traffic_ros2/schedule/MonitorNode.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:425:15: error: ‘participants’ was not declared in this scope; did you mean ‘ParticipantId’? 425 participants.insert({id, *database->get_participant(id)}); ^~~~ ParticipantId /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:430:22: error: ‘class rmf_traffic::schedule::Mirror’ has no member named ‘update_participants_info’ 430 mirror.update_participants_info(participants); ^~~~~~~~ /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:430:47: error: ‘participants’ was not declared in this scope; did you mean ‘ParticipantId’? 430 mirror.update_participants_info(participants); ^~~~ ParticipantId /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp: In member function ‘virtual void rmf_traffic_ros2::schedule::ScheduleNode::register_query(const std::shared_ptr&, const SharedPtr&, const SharedPtr&)’: /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:546:30: error: no match for ‘operator==’ (operand types are ‘rmf_traffic::schedule::Query’ and ‘rmf_traffic::schedule::Query’) 546 if (existing_query.query == new_query) ~~~~ ^~ ~~~~~
rmf_traffic::schedule::Query
rmf_traffic::schedule::Query

/home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp: In member function ‘virtual void rmf_traffic_ros2::schedule::ScheduleNode::register_participant(const request_id_ptr&, const SharedPtr&, const SharedPtr&)’: /home/shan/rmf_ws/src/rmf/rmf_ros2/rmf_traffic_ros2/src/rmf_traffic_ros2/schedule/Node.cpp:680:9: error: ‘using element_type = class rmf_traffic_ros2::schedule::ParticipantRegistry’ {aka ‘class rmf_traffic_ros2::schedule::ParticipantRegistry’} has no member named ‘add_or_retrieve_participant’ 680 | ->add_or_retrieve_participant(

mxgrey commented 2 years ago

It looks like you're trying to compile with incompatible versions of the rmf_traffic and rmf_ros2 repos. Please make sure you git pull the latest main branch of every repo in your workspace and then try again.

ruk-shan commented 2 years ago

Thank u very much for the reply. I will try that. BTW I was following the instructions may have to update them.

mxgrey commented 2 years ago

Which instructions were you following specifically?

Also, were you following the instructions with a completely fresh workspace, or were you trying to build on top of a workspace that already had some repos in it?

ruk-shan commented 2 years ago

from this page, https://github.com/open-rmf/rmf. I'm trying to build a fresh workspace.

ruk-shan commented 2 years ago

I have tried to build to with main branches and still fails. Please help.

mxgrey commented 2 years ago

Do you have a version of rmf_traffic installed to your system or installed in your ROS distro? For example if you're using Foxy, you might have the apt package ros-foxy-rmf-traffic installed.

If so, we've seen some issues where colcon does not overlay the workspace version of the package correctly over the version that's installed, and so the build system ends up using the installed version of rmf_traffic. If that's your situation, then you'll need to uninstall whatever version of rmf_traffic you have previously installed.

I just ran through the build instructions on my own computer and had no build errors, so I do believe there's something wonky on your machine somewhere.

ruk-shan commented 2 years ago

Thank u very much for the answer. I will try again report the progress.

ruk-shan commented 2 years ago

I installed RMF from binary few weeks ago. I uninstalled rmf_traffic packages as u said and it works.!!!!! Thank u very much.