forked from rm-controls/rm_control
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rm-controls#230 from GuraMumei/master
Update interactive sender
- Loading branch information
Showing
21 changed files
with
631 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
uint32 event_data | ||
bool forward_supply_station_state | ||
bool inside_supply_station_state | ||
bool supplier_zone_state | ||
bool power_rune_activation_point_state | ||
bool small_power_rune_state | ||
bool large_power_rune_state | ||
uint8 ring_elevated_ground_state | ||
uint8 r3_state | ||
uint8 r4_state | ||
uint8 base_shield_value | ||
uint16 be_hit_time | ||
uint8 be_hit_target | ||
uint8 central_point_state | ||
|
||
time stamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
uint32 rfid_status | ||
bool base_buff_point_state | ||
bool own_ring_elevated_ground_state | ||
bool enemy_ring_elevated_ground_state | ||
bool own_r3_state | ||
bool enemy_r3_state | ||
bool own_r4_state | ||
bool enemy_r4_state | ||
bool power_rune_activation_point_state | ||
bool forward_own_launch_ramp_buff_point_state | ||
bool behind_own_launch_ramp_buff_point_state | ||
bool forward_enemy_launch_ramp_buff_point_state | ||
bool behind_enemy_launch_ramp_buff_point_state | ||
bool own_outpost_buff_point | ||
bool own_side_restoration_zone | ||
bool own_sentry_patrol_zones | ||
bool enemy_sentry_patrol_zones | ||
bool own_large_resource_island_point | ||
bool enemy_large_resource_island_point | ||
bool own_exchange_zone | ||
bool central_buff_point | ||
uint32 reverse | ||
|
||
time stamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
uint8 target_robot_ID | ||
float32 target_position_x | ||
float32 target_position_y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// | ||
// Created by gura on 24-5-29. | ||
// | ||
|
||
#pragma once | ||
|
||
#include "rm_referee/ui/ui_base.h" | ||
|
||
namespace rm_referee | ||
{ | ||
class InteractiveSender : public UiBase | ||
{ | ||
public: | ||
explicit InteractiveSender(XmlRpc::XmlRpcValue& rpc_value, Base& base, std::deque<Graph>* graph_queue = nullptr, | ||
std::deque<Graph>* character_queue = nullptr) | ||
: UiBase(rpc_value, base, graph_queue, character_queue){}; | ||
|
||
void sendInteractiveData(int data_cmd_id, int receiver_id, unsigned char data); | ||
void sendRadarInteractiveData(const rm_referee::ClientMapReceiveData& data); | ||
void sendMapSentryData(const rm_referee::MapSentryData& data); | ||
void sendSentryCmdData(const rm_msgs::SentryInfoConstPtr& data); | ||
void sendRadarCmdData(const rm_msgs::RadarInfoConstPtr& data); | ||
virtual bool needSendInteractiveData(); | ||
ros::Time last_send_time_; | ||
}; | ||
|
||
class CustomInfoSender : public InteractiveSender | ||
{ | ||
public: | ||
explicit CustomInfoSender(XmlRpc::XmlRpcValue& rpc_value, Base& base, std::deque<Graph>* graph_queue = nullptr, | ||
std::deque<Graph>* character_queue = nullptr) | ||
: InteractiveSender(rpc_value, base, graph_queue, character_queue){}; | ||
void sendCustomInfoData(std::wstring data); | ||
|
||
protected: | ||
std::wstring last_custom_info_; | ||
}; | ||
|
||
class BulletNumShare : public InteractiveSender | ||
{ | ||
public: | ||
explicit BulletNumShare(XmlRpc::XmlRpcValue& rpc_value, Base& base, std::deque<Graph>* graph_queue = nullptr, | ||
std::deque<Graph>* character_queue = nullptr) | ||
: InteractiveSender(rpc_value, base, graph_queue, character_queue){}; | ||
void sendBulletData(); | ||
void updateBulletRemainData(const rm_msgs::BulletAllowance& data); | ||
int bullet_42_mm_num_, bullet_17_mm_num_, count_receive_time_; | ||
}; | ||
|
||
class SentryToRadar : public InteractiveSender | ||
{ | ||
public: | ||
explicit SentryToRadar(XmlRpc::XmlRpcValue& rpc_value, Base& base, std::deque<Graph>* graph_queue = nullptr, | ||
std::deque<Graph>* character_queue = nullptr) | ||
: InteractiveSender(rpc_value, base, graph_queue, character_queue){}; | ||
void updateSentryAttackingTargetData(const rm_msgs::SentryAttackingTargetConstPtr& data); | ||
bool needSendInteractiveData() override; | ||
void sendSentryToRadarData(); | ||
ros::Time last_get_data_time_; | ||
float target_position_x_, target_position_y_, robot_id_; | ||
}; | ||
|
||
} // namespace rm_referee |
Oops, something went wrong.