Skip to content

Commit

Permalink
Update to include hmm output in recording
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannah DeFazio committed Jul 6, 2023
1 parent b326438 commit e3572b0
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 88 deletions.
88 changes: 0 additions & 88 deletions tmux/record_ros_bag_activity_only.yml

This file was deleted.

121 changes: 121 additions & 0 deletions tmux/record_ros_bag_activity_steps_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#
# Used to create ROS bags for all topics published from the HL2.
# This configuration should be run by itself (e.g. not in combination with
# another tmuxinator launch).
#

name: record-ros-bag-activity-only
root: <%= ENV["ANGEL_WORKSPACE_DIR"] %>

# Optional tmux socket
# socket_name: foo

# Note that the pre and post options have been deprecated and will be replaced by
# project hooks.

# Project hooks

# Runs on project start, always
# on_project_start: command
on_project_start: |
export ROS_NAMESPACE=${ROS_NAMESPACE:-/kitware}
export HL2_IP=${HL2_IP:-192.168.1.101}
export CONFIG_DIR=${ANGEL_WORKSPACE_DIR}/config
export MODEL_DIR=${ANGEL_WORKSPACE_DIR}/model_files
# Run on project start, the first time
# on_project_first_start: command

# Run on project start, after the first time
# on_project_restart: command

# Run on project exit ( detaching from tmux session )
# on_project_exit: command

# Run on project stop
# on_project_stop: command

# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
# pre_window: rbenv shell 2.0.0-p247

# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf
tmux_options: -f <%= ENV["ANGEL_WORKSPACE_DIR"] %>/tmux/tmux.conf

# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# tmux_command: byobu

# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
# startup_window: editor

# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used.
# startup_pane: 1

# Controls whether the tmux session should be attached to automatically. Defaults to true.
# attach: false

windows:
- sensor_input:
layout: even-vertical
panes:
- ros_bag_play: #ros2 bag play <<PATH_TO_BAG_FILE>>
#- image_converter: ros2 run angel_datahub ImageConverter --ros-args
# -r __ns:=${ROS_NAMESPACE}
# -p topic_input_images:=PVFramesNV12
# -p topic_output_images:=PVFramesRGB

- object_detector:
layout: even-vertical
panes:
- detector: ros2 run angel_system_nodes berkeley_object_detector --ros-args
-r __ns:=${ROS_NAMESPACE}
-p image_topic:=PVFramesBGR
-p det_topic:=ObjectDetections2d
-p det_conf_threshold:=0.4
-p model_config:=${ANGEL_WORKSPACE_DIR}/angel_system/berkeley/configs/MC50-InstanceSegmentation/medical/M2/stage2/tourniquet_stage2_interstitial.yaml
-p cuda_device_id:=0
- simple_2d_overlay: ros2 run angel_debug Simple2dDetectionOverlay --ros-args
-r __ns:=${ROS_NAMESPACE}
-p topic_input_images:=PVFramesBGR
-p topic_input_det_2d:=ObjectDetections2d
-p topic_output_images:=pv_image_detections_2d
-p filter_top_k:=5
- compress_image: ros2 run image_transport republish raw compressed --ros-args
-r __ns:=${ROS_NAMESPACE}
--remap in:=pv_image_detections_2d
--remap out/compressed:=pv_image_detections_2d/compressed

- activity_classifier: ros2 run angel_system_nodes activity_from_obj_dets_classifier --ros-args
-r __ns:=${ROS_NAMESPACE}
-p det_topic:=ObjectDetections2d
-p act_topic:=ActivityDetections
-p classifier_file:=${MODEL_DIR}/recipe_m2_apply_tourniquet_v0.052.pkl

- task_monitor: ros2 run angel_system_nodes task_monitor_v2 --ros-args
-r __ns:=${ROS_NAMESPACE}
-p det_topic:=ActivityDetections
-p config_file:=${CONFIG_DIR}/tasks/task_steps_config-recipe_m2_apply_tourniquet_v0.052.yaml
-p task_state_topic:=TaskUpdates
-p task_error_topic:=TaskErrors
-p query_task_graph_topic:=query_task_graph
-p step_complete_threshold:=0.5
-p sys_cmd_topic:=SystemCommands
-p enable_manual_progression:=false
-p allow_rollback:=false

- engineering-ui:
layout: even-vertical
panes:
- websocket: ros2 launch rosbridge_server rosbridge_websocket_launch.xml port:=9090
- server: node src/angel_utils/demo_ui/index.js
--namespace=${ROS_NAMESPACE}
--image_topic=pv_image_detections_2d/compressed
--query_task_graph_topic=query_task_graph
--task_updates_topic=TaskUpdates
--activity_detections_topic=ActivityDetections
--task_errors_topic=TaskErrors

- ros_bag_record: ros2 bag record
${ROS_NAMESPACE}/ActivityDetections
${ROS_NAMESPACE}/TaskUpdates
${ROS_NAMESPACE}/PVFramesBGR

0 comments on commit e3572b0

Please sign in to comment.