Skip to content

Commit

Permalink
SimpleAI内での最新メッセージ管理
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Feb 21, 2024
1 parent 629f53e commit acf79d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crane_simple_ai/include/crane_commander.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ROSNode : public rclcpp::Node
crane_msgs::msg::RobotCommands msg;
msg.header = world_model->getMsg().header;
msg.is_yellow = world_model->isYellow();
msg.robot_commands.push_back(commander->getMsg());
msg.robot_commands.push_back(latest_msg);
publisher_robot_commands->publish(msg);
});
}
Expand All @@ -131,6 +131,8 @@ class ROSNode : public rclcpp::Node

rclcpp::TimerBase::SharedPtr timer;

crane_msgs::msg::RobotCommand latest_msg;

rclcpp::Publisher<crane_msgs::msg::RobotCommands>::SharedPtr publisher_robot_commands;

rclcpp::Subscription<crane_msgs::msg::RobotFeedbackArray>::SharedPtr subscription_robot_feedback;
Expand Down

0 comments on commit acf79d1

Please sign in to comment.