4. Feature: Vision - FAAMT/ros_ugv_ultron GitHub Wiki

Vision refers to the ability of a robot or an autonomous system to perceive and interpret its surrounding environment using visual data. Vision plays a crucial role in enabling robots to interact and navigate in the world.

We use two ROS packages: raspicam_node (git) & rqt_image_view (git).

Interfacing with the 1080P MP5 OV5647 using the raspicam_node Package

Package Name: raspicam_node
Install Instructions: git clone https://github.com/UbiquityRobotics/raspicam_node.git (kinetic branch)
Run Command: rosrun raspicam_node raspicam_node
Node Information:
The raspicam_node from Ubiquity Robotics is a ROS node that plays a significant role in leveraging vision capabilities for robots using Raspberry Pi and the Raspberry Pi Camera (specifically, the Raspberry Pi Camera Module or the Raspberry Pi HQ Camera). The raspicam_node acts as an interface between the Raspberry Pi Camera and the ROS ecosystem, allowing ROS-based robots to access and utilize the camera's visual data effectively.

Check out Ubiquity Robotics' official repository and their helpful documentary for in-depth insights into the raspicam_node package.

Visual Data Representation with rqt_image_view Package

Package Name: rqt_image_view
Install Instructions: git clone https://github.com/ros-visualization/rqt_image_view
Run Command: rosrun rqt_image_view rqt_image_view to access the /raspicam_node/image/compressed topic.
Node Information:
The rqt_image_view is a ROS package that provides a graphical interface for visualizing images published on specific ROS topics. It allows real-time viewing of camera streams, LiDAR data, and other image-related information in ROS. Users can zoom, pan, and analyze the images, making it useful for robotics and computer vision projects.

For more information and usage examples, visit the official rqt_image_view wiki.

Camera Configuration using Launch Files

A launch file is a convenient tool for defining and organizing the configuration needed to initiate either a full ROS system or specific components. In our case, we can utilize it to set up the camera according to our project's requirements. The launch file allows us to adjust various parameters essential for camera configuration. Here are the key parameters relevant to our project:

enable_raw: Boolean, default: "true".
enable_imv: Boolean, default: "false".
camera_id: Integer, default: "0".
camera_frame_id: String, default: "raspicam".
camera_name: String, default: "camerav2_320x240".
camera_info_url: String, default: "package://raspicam_node/camera_info/camerav2_320x240.yaml".
width: Integer, default: "320".
height: Integer, default: "240".
framerate: Integer, default: "30".
exposure_mode: String, default: "antishake".
shutter_speed: Integer, default: "0" (auto).

Next, let's see its implementation in a launch file.

Camera Parameters:

<arg name="enable_raw" default="true"/>
<arg name="enable_imv" default="false"/>
<arg name="camera_id" default="0"/>
<arg name="camera_frame_id" default="raspicam"/>
<arg name="camera_name" default="camerav2_320x240"/>

Nodes - raspicam_node:

<node type="raspicam_node" pkg="raspicam_node" name="raspicam_node" output="screen">
  <!-- Parameters for raspicam_node -->
  <param name="camera_frame_id" value="$(arg camera_frame_id)"/>
  <param name="enable_raw" value="$(arg enable_raw)"/>
  <param name="enable_imv" value="$(arg enable_imv)"/>
  <param name="camera_id" value="$(arg camera_id)"/>
  <param name="camera_info_url" value="package://raspicam_node/camera_info/camerav2_320x240.yaml"/>
  <param name="camera_name" value="$(arg camera_name)"/>
  <param name="width" value="320"/>
  <param name="height" value="240"/>
  <param name="framerate" value="30"/>
  <param name="exposure_mode" value="antishake"/>
  <param name="shutter_speed" value="0"/>
</node>

In summary, this ROS launch file sets up the camera for robot ULTRON, and you can adjust the specified parameters to customize the camera's behavior as needed. The reason for configuring the camera is to utilize the opencv package for object detection in the next phase of the project.

⚠️ **GitHub.com Fallback** ⚠️