diff --git a/docker/interfacing/sensor_interfacing/sensor_interfacing.Dockerfile b/docker/interfacing/sensor_interfacing/sensor_interfacing.Dockerfile index 8729a254..8cd602b0 100644 --- a/docker/interfacing/sensor_interfacing/sensor_interfacing.Dockerfile +++ b/docker/interfacing/sensor_interfacing/sensor_interfacing.Dockerfile @@ -21,6 +21,8 @@ FROM ${BASE_IMAGE} as dependencies # Camera and LiDAR ROS2 Driver RUN apt update && apt install -y ros-$ROS_DISTRO-spinnaker-camera-driver ros-$ROS_DISTRO-velodyne +RUN apt install -y ros-$ROS_DISTRO-rviz2 ros-$ROS_DISTRO-image-proc + # Install Rosdep requirements COPY --from=source /tmp/colcon_install_list /tmp/colcon_install_list RUN apt-fast install -qq -y --no-install-recommends $(cat /tmp/colcon_install_list) @@ -34,6 +36,10 @@ WORKDIR / RUN apt-get -qq autoremove -y && apt-get -qq autoclean && apt-get -qq clean && \ rm -rf /root/* /root/.ros /tmp/* /var/lib/apt/lists/* /usr/share/doc/* + +# Enable X11 Forwarding +RUN apt-get install -qqy x11-apps + ################################ Build ################################ FROM dependencies as build diff --git a/modules/dev_overrides/docker-compose.infrastructure.yaml b/modules/dev_overrides/docker-compose.infrastructure.yaml index 38447cfc..f2c00ea9 100644 --- a/modules/dev_overrides/docker-compose.infrastructure.yaml +++ b/modules/dev_overrides/docker-compose.infrastructure.yaml @@ -9,4 +9,4 @@ services: data_stream: extends: file: ../docker-compose.infrastructure.yaml - service: data_stream + service: data_stream \ No newline at end of file diff --git a/modules/docker-compose.interfacing.yaml b/modules/docker-compose.interfacing.yaml index 54dc78bf..9067a8fa 100644 --- a/modules/docker-compose.interfacing.yaml +++ b/modules/docker-compose.interfacing.yaml @@ -13,6 +13,12 @@ services: command: /bin/bash -c "ros2 launch sensor_interfacing all_sensors.launch.py" network_mode: "host" + environment: + DISPLAY: $DISPLAY + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + - ~/.Xauthority:/root/.Xauthority + can_interfacing: build: context: .. diff --git a/src/interfacing/sensor_interfacing/launch/include/cameras.launch.py b/src/interfacing/sensor_interfacing/launch/include/cameras.launch.py index 3ebb6a57..5e9839a5 100644 --- a/src/interfacing/sensor_interfacing/launch/include/cameras.launch.py +++ b/src/interfacing/sensor_interfacing/launch/include/cameras.launch.py @@ -20,24 +20,41 @@ def generate_launch_description(): description='FLIR serial number of camera (in quotes!!)') # extra_params = { 'debug': True, - # #'device_link_throughput_limit': 125000000, - # #'gev_scps_packet_size': 9000, - # } + # 'device_link_throughput_limit': 125000000, + # 'gev_scps_packet_size': 1440, + # } camera_node = Node( package='spinnaker_camera_driver', executable='camera_driver_node', output='screen', name='flir_camera', - parameters=[{'parameter_file': parameter_file, - 'serial_number': [serial], - }], + arguments=['--ros-args', '--log-level', 'debug'], + parameters=[ + # extra_params, + { + 'parameter_file': parameter_file, + 'serial_number': [serial], + }] + , remappings=[ ('~/control', '/exposure_control/control'), ]) + debayer_node = Node( + package='image_proc', + executable='debayer_node', + output='screen', + name='debayer_node', + remappings=[ + ('/image_raw', '/flir_camera/image_raw'), + ] + ) + + return LaunchDescription([ parameter_file_arg, serial_arg, - camera_node + camera_node, + debayer_node ])