lajoiepy / cslam

Swarm-SLAM nodes (ROS 2)
https://lajoiepy.github.io/cslam_documentation/html/index.html
MIT License
42 stars 12 forks source link

error: cannot convert ‘std::__cxx11::basic_string<char>’ to ‘const char*’ #31

Closed talhassj28 closed 1 year ago

talhassj28 commented 1 year ago

Hi,

while building the cslam package with colcon build, I received the above mentioned error (see screenshot). After a quick google I modified the code as follows:

In simulated_rendezvous.cpp line 20: ("Simulated rendezvous schedule of robot " + line).c_str() instead of "Simulated rendezvous schedule of robot " + line

And the same modification in decentralized_pgo.cpp line 539: ("Timeout: " + std::to_string(robot_id_)).c_str() instead of "Timeout: " + std::to_string(robot_id_)

I'm opening this issue, because maybe you're able to find a more elegant way to solve the problem.

Bildschirmfoto von 2023-06-08 16-55-38

lajoiepy commented 1 year ago

Great, thanks for pointing this out and proposing a fix!