Skip to content

Commit

Permalink
Update: DBを更新
Browse files Browse the repository at this point in the history
  • Loading branch information
kasahara-san committed Dec 11, 2024
1 parent b9b79cd commit edc1c2a
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 55 deletions.
2 changes: 1 addition & 1 deletion tms_sp/tms_sp_sensing/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
entry_points={
'console_scripts': [
"tms_sp_zx200_end_effector = tms_sp_sensing.tms_sp_zx200_end_effector:main",
"tms_sp_zx200_collision_objects = tms_sp_sensing.tms_sp_zx200_collison_objects_ic120:main",
"tms_sp_zx200_collision_objects = tms_sp_sensing.tms_sp_zx200_collision_objects_ic120:main",
"sample = tms_sp_sensing.sample:main",
"tms_sp_flgs = tms_sp_sensing.tms_sp_flgs:main",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def update_db_parameter(self, msg: Zx200CollisionObjectsIc120) -> None:
client = MongoClient(MONGODB_IPADDRESS, MONGODB_PORTNUMBER)
db = client['rostmsdb']
collection = db['parameter']
query = {"model_name": msg.model_name, "type" : "dynamic", "component_name": msg.component_name}
query = {"model_name": msg.model_name, "type" : "dynamic", "record_name": msg.record_name}
update_parameter_info= {"x": None, "y": None, "z": None, "qx": None, "qy": None, "qz": None, "qw": None}
parameter_info = collection.find_one(query)
# self.get_logger().info(f"BEFORE: parameter_info: {update_parameter_info}")
Expand Down
1 change: 0 additions & 1 deletion tms_ts/sensing_msgs/msg/Flgs.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
string record_name
bool loaded_flg
bool continue_flg
bool sensing_arrival_flg
bool sensing_loaded_flg
Expand Down
2 changes: 1 addition & 1 deletion tms_ts/sensing_msgs/msg/Zx200CollisionObjectsIc120.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
string model_name
string component_name
string record_name
float64 x
float64 y
float64 z
Expand Down
5 changes: 5 additions & 0 deletions tms_ts/tms_ts_launch/launch/tms_ts_demo202412.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ def generate_launch_description():
executable='tms_sp_flgs',
output='screen'
),
Node(
package='tms_sp_sensing',
executable='tms_sp_zx200_collision_objects',
output='screen'
),
Node(
package="tms_db_manager",
executable="tms_db_reader_task",
Expand Down
29 changes: 15 additions & 14 deletions tms_ts/tms_ts_manager/config/demo_202412/task_ic120_act.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,55 @@
<!-- ////////// -->
<BehaviorTree ID="BehaviorTree">
<Sequence>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="MOVING_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_CHECK_MOUND_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="MOVING_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_CHECK_MOUND_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<ForceSuccess>
<KeepRunningUntilFailure>
<Parallel failure_threshold="1" success_threshold="-1">
<Action ID="BlackboardValueReaderMongo" mongo_param_name="CONTINUE_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU" output_port="CONTINUE_FLG"/>
<Action ID="BlackboardValueReaderMongo" mongo_param_name="CONTINUE_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU" output_port="CONTINUE_FLG"/>
<IfThenElse>
<Action ID="ConditionalExpressionBool" conditional_expression_bool="CONTINUE_FLG == true"/>
<Sequence>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="LOAD_POINT" subtask_name="st_ic120_follow_waypoints"/>
<Action ID="MongoValueWriter" input_value="true" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="true" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<ForceSuccess>
<KeepRunningUntilFailure>
<Parallel failure_threshold="1" success_threshold="-1">
<Action ID="BlackboardValueReaderMongo" mongo_param_name="MOVING_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU" output_port="MOVING_FLG"/>
<Action ID="BlackboardValueReaderMongo" mongo_param_name="MOVING_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU" output_port="MOVING_FLG"/>
<IfThenElse>
<Action ID="ConditionalExpressionBool" conditional_expression_bool="MOVING_FLG == true"/>
<KeepRunningUntilFailure>
<Parallel failure_threshold="1" success_threshold="-1">
<Action ID="BlackboardValueReaderMongo" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU" output_port="SENSING_LOADED_FLG"/>
<Action ID="BlackboardValueReaderMongo" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU" output_port="SENSING_LOADED_FLG"/>
<IfThenElse>
<Action ID="ConditionalExpressionBool" conditional_expression_bool="SENSING_LOADED_FLG == true"/>
<Sequence>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="RELEASE_PATH" subtask_name="st_ic120_follow_waypoints"/>
<Action ID="LeafNodeIc120" model_name="ic120" record_name="release_angle_1" subtask_name="st_ic120_release_soil"/>
<Action ID="LeafNodeIc120" model_name="ic120" record_name="release_angle_2" subtask_name="st_ic120_release_soil"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="LOAD_PATH" subtask_name="st_ic120_follow_waypoints"/>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="LOAD_POINT" subtask_name="st_ic120_follow_waypoints"/>
<AlwaysFailure/>
</Sequence>
<KeepRunningUntilFailure>
<Parallel failure_threshold="1" success_threshold="-1">
<Action ID="BlackboardValueReaderMongo" mongo_param_name="SENSING_CHECK_MOUND_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU" output_port="SENSING_CHECK_MOUND_FLG"/>
<Action ID="BlackboardValueReaderMongo" mongo_param_name="SENSING_CHECK_MOUND_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU" output_port="SENSING_CHECK_MOUND_FLG"/>
<IfThenElse>
<Action ID="ConditionalExpressionBool" conditional_expression_bool="SENSING_CHECK_MOUND_FLG == true"/>
<Sequence>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="ARRIVAL_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="RELEASE_PATH" subtask_name="st_ic120_follow_waypoints"/>
<Action ID="LeafNodeIc120" model_name="ic120" record_name="release_angle_1" subtask_name="st_ic120_release_soil"/>
<Action ID="LeafNodeIc120" model_name="ic120" record_name="release_angle_2" subtask_name="st_ic120_release_soil"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SIMIZU"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="SENSING_LOADED_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="LOAD_PATH" subtask_name="st_ic120_follow_waypoints"/>
<Action ID="LeafNodeIc120" model_name="ic120" name="leaf_node_ic120" record_name="LOAD_POINT" subtask_name="st_ic120_follow_waypoints"/>
<Action ID="MongoValueWriter" input_value="false" mongo_param_name="CONTINUE_FLG" mongo_record_name="SAMPLE_BLACKBOARD_SHIMIZU"/>
<AlwaysFailure/>
</Sequence>
<AlwaysFailure/>
Expand Down
Loading

0 comments on commit edc1c2a

Please sign in to comment.