Skip to content

Commit

Permalink
updated sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Oct 15, 2024
1 parent e8a8625 commit 65f2171
Show file tree
Hide file tree
Showing 13 changed files with 414 additions and 4 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<arg name="custom_config" default="" />

<group ns="$(arg camera_node)">
<group ns="$(arg UAV_NAME)/$(arg camera_node)">

<!-- apriltag_ros continuous detection node -->
<node pkg="apriltag_ros" type="apriltag_ros_continuous_node" name="apriltag_detector" clear_params="true" output="screen">
Expand All @@ -19,8 +19,8 @@
<rosparam if="$(eval not arg('custom_config') == '')" file="$(arg custom_config)" />

<!-- Remap topics from those used in code to those on the ROS network -->
<remap from="image_rect" to="$(arg camera_node)/$(arg image_topic)" />
<remap from="camera_info" to="$(arg camera_node)/camera_info" />
<remap from="image_rect" to="$(arg image_topic)" />
<remap from="camera_info" to="camera_info" />

<remap from="tag_detections" to="~/tag_detections" />
<remap from="tag_detections_image" to="~/tag_detections_image" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
volumes:

uav_custom_files:

shared_data:

bag_files:

services:

# will copy session-specific data shared between containers from the shared_data container to a shared volume
Expand All @@ -11,7 +15,37 @@ services:
- shared_data:/etc/ctu-mrs/shared_data:consistent
command: sh -c "rm -rvf /etc/ctu-mrs/shared_data/*; mkdir -pv /etc/ctu-mrs/shared_data; cp -rv /etc/shared_data/* /etc/ctu-mrs/shared_data/"

# starts the HW API for connecting the MRS UAV System to PX4
# will copy uav-specific configs, launch files and other files from the uav-specific docker image to a shared volume
copy_uav_custom_files:
image: fly4future/uav_custom_files:latest
volumes:
- uav_custom_files:/etc/fly4future/uav_custom_files:consistent
command: sh -c "rm -rvf /etc/fly4future/uav_custom_files/*; mkdir -pv /etc/fly4future/uav_custom_files; cp -rv /etc/uav_custom_files/${UAV_TYPE}/${UAV_ID}/* /etc/fly4future/uav_custom_files/"

# starts roscore
# this is the first container in the ROS pipeline
roscore:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
depends_on:
- copy_uav_custom_files
env_file:
- ./stack.env
command: roscore

# starts the camera drivers
cameras:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
volumes:
- uav_custom_files:/etc/fly4future/uav_custom_files:consistent
devices:
- /dev/:/dev/
privileged: true
env_file:
- ./stack.env
command: bash -c "waitForRos && roslaunch /etc/fly4future/uav_custom_files/launch_files/cameras.launch"

apriltag_bottom:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
Expand All @@ -35,6 +69,7 @@ services:
volumes:
- shared_data:/etc/ctu-mrs/shared_data:consistent
- /dev/:/dev/
- bag_files:/etc/bag_files:consistent
command:
- bash --rcfile /etc/catkin_workspace/devel/setup.bash
privileged: true
Expand Down
145 changes: 145 additions & 0 deletions docker/uav_session/camera_test_bottom/rviz/camera_test.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
Splitter Ratio: 0.7529411911964417
Tree Height: 203
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Name: Time
SyncMode: 0
SyncSource: Camera
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Class: rviz/Camera
Enabled: true
Image Rendering: background and overlay
Image Topic: /uav80/camera_down/image_raw
Name: Camera
Overlay Alpha: 0.5
Queue Size: 2
Transport Hint: compressed
Unreliable: false
Value: true
Visibility:
Grid: true
Value: true
april_small: true
Zoom Factor: 1
- Alpha: 1
Class: rviz/Axes
Enabled: true
Length: 0.06400000303983688
Name: april_small
Radius: 0.009999999776482582
Reference Frame: recursive_tag_1_small
Show Trail: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: uav80/fcu
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 1.662746548652649
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.3103981614112854
Target Frame: <Fixed Frame>
Yaw: 4.828577041625977
Saved: ~
Window Geometry:
Camera:
collapsed: false
Displays:
collapsed: false
Height: 1040
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd00000004000000000000030500000376fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b00000154000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006101000001950000021c0000001600ffffff000000010000010000000376fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b00000376000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003efc0100000002fb0000000800540069006d00650100000000000007800000030200fffffffb0000000800540069006d006501000000000000045000000000000000000000036f0000037600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1920
X: 0
Y: 40
1 change: 1 addition & 0 deletions docker/uav_session/camera_test_bottom/rviz/rviz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rosrun rviz rviz -d ./camera_test.rviz
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
UAV_NAME=uav80
ROS_MASTER_URI=http://localhost:11311
UAV_TYPE=robofly
UAV_ID=c4750f
77 changes: 77 additions & 0 deletions docker/uav_session/camera_test_front/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
volumes:

uav_custom_files:

shared_data:

bag_files:

services:

# will copy session-specific data shared between containers from the shared_data container to a shared volume
copy_shared_data:
image: fly4future/robofly:apriltag_tests
volumes:
- shared_data:/etc/ctu-mrs/shared_data:consistent
command: sh -c "rm -rvf /etc/ctu-mrs/shared_data/*; mkdir -pv /etc/ctu-mrs/shared_data; cp -rv /etc/shared_data/* /etc/ctu-mrs/shared_data/"

# will copy uav-specific configs, launch files and other files from the uav-specific docker image to a shared volume
copy_uav_custom_files:
image: fly4future/uav_custom_files:latest
volumes:
- uav_custom_files:/etc/fly4future/uav_custom_files:consistent
command: sh -c "rm -rvf /etc/fly4future/uav_custom_files/*; mkdir -pv /etc/fly4future/uav_custom_files; cp -rv /etc/uav_custom_files/${UAV_TYPE}/${UAV_ID}/* /etc/fly4future/uav_custom_files/"

# starts roscore
# this is the first container in the ROS pipeline
roscore:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
depends_on:
- copy_uav_custom_files
env_file:
- ./stack.env
command: roscore

# starts the camera drivers
cameras:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
volumes:
- uav_custom_files:/etc/fly4future/uav_custom_files:consistent
devices:
- /dev/:/dev/
privileged: true
env_file:
- ./stack.env
command: bash -c "waitForRos && roslaunch /etc/fly4future/uav_custom_files/launch_files/cameras.launch"

apriltag_front:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
depends_on:
- copy_shared_data
volumes:
- shared_data:/etc/ctu-mrs/shared_data:consistent
env_file:
- ./stack.env
command: bash -c "waitForRos && roslaunch /etc/ctu-mrs/shared_data/apriltag_detector.launch custom_config:=/etc/ctu-mrs/shared_data/apriltag.yaml camera_node:=camera_front image_topic:=image_raw"

# this container can be used to access a terminal with ROS inside the compose session
terminal:
image: ctumrs/mrs_uav_system:robofly
network_mode: host
depends_on:
- copy_shared_data
env_file:
- ./stack.env
entrypoint: ["/bin/bash", "-c"]
volumes:
- shared_data:/etc/ctu-mrs/shared_data:consistent
- /dev/:/dev/
- bag_files:/etc/bag_files:consistent
command:
- bash --rcfile /etc/catkin_workspace/devel/setup.bash
privileged: true
stdin_open: true
tty: true
Loading

0 comments on commit 65f2171

Please sign in to comment.