SolveTrajectory.cpp文件94行左右
解决识别到烧饼就寄的问题
aim_msg.robot_id = std::stoi(id);
//改为下面语句
try
{
//关键为这句
aim_msg.robot_id = id_unit8_map.at(id);
}
catch (const invalid_argument &e)
{
aim_msg.robot_id = 9;
RCLCPP_INFO(get_logger(), "error %s", e.what());
}
脚本记得给权限
sudo chmod +x