osrf / rmf_core

Provides the centralized functions of RMF: scheduling, etc.
Apache License 2.0
102 stars 41 forks source link

colcon build error on waiting event #167

Closed MakinoharaShouko closed 4 years ago

MakinoharaShouko commented 4 years ago

I am getting colcon_build error after pulling the latest rmf_core. The error is

/home/makinohara/rmf_demos_ws/src/rmf/rmf_core/rmf_fleet_adapter/src/rmf_fleet_adapter/agv/TrafficLight.cpp: In member function ‘void rmf_fleet_adapter::agv::TrafficLight::UpdateHandle::Implementation::Data::update_path(std::size_t, const std::vector<rmf_fleet_adapter::agv::Waypoint>&)’:
/home/makinohara/rmf_demos_ws/src/rmf/rmf_core/rmf_fleet_adapter/src/rmf_fleet_adapter/agv/TrafficLight.cpp:214:46: error: ‘Wait’ is not a member of ‘rmf_traffic::agv::Graph::Lane’
               rmf_traffic::agv::Graph::Lane::Wait(last_wp.mandatory_delay()));
                                              ^~~~
make[2]: *** [CMakeFiles/rmf_fleet_adapter.dir/src/rmf_fleet_adapter/agv/TrafficLight.cpp.o] Error 1

I am really confused why there is this error. I have also tried to do rm -rf build log install before running colcon_build but the error still exists. Has anyone encountered this too?

mxgrey commented 4 years ago

First I'd suggest making sure you're really on the latest master branch. You can see that the rmf_traffic::agv::Graph::Lane::Wait class is defined here.

If you're really encountering this error while building the latest master, then somehow somewhere you must have an old version of the rmf_traffic/agv/Graph.hpp header, and your compiler is somehow using that header instead of the newer one. When building your rmf_demos_ws, make sure you're only sourcing the ROS2 distro and not sourcing any other workspace that might contain rmf_core.

mxgrey commented 4 years ago

Also, have you ever installed rmf_traffic into your system install directory (e.g. /usr/)? If you've ever installed it system-wide then the compiler may be picking up that older installation.

MakinoharaShouko commented 4 years ago

OK I found that I once installed the binary package of rmf_core and that is where my problem comes from.