TEMAS RGB Camera Node¶
The TEMAS RGB/visible-light camera node streams color frames as ROS2 sensor_msgs/Image, publishes status and info topics, and exposes runtime-tunable camera settings (exposure, brightness, contrast, focus, saturation, gain).
Parameters may be set at startup or changed live using ros2 param set.
- class TemasCameraVisNode(*args, **kwargs)[source]¶
Bases:
NodeROS2 node for streaming a TEMAS RGB camera.
This node connects to a TEMAS VIS camera, continuously publishes frames as ROS2 images, and provides camera status and info topics. Camera parameters (exposure, brightness, contrast, lens position, saturation, gain) can be set at startup or dynamically via ROS2 parameters.
- Parameters:
ip_address(str): IP address of the TEMAS device (default: ‘192.168.4.4’)Example:
ros2 run temas_ros2 camera_vis --ros-args -p ip_address:=192.168.4.4set_exposure_time(int): Exposure time in microseconds (default: 17000)set_brightness(int): Brightness (default: 50)set_contrast(int): Contrast (default: 3)set_lens_position(int): Lens focus position (default: 25)set_saturation(int): Saturation (default: 3)set_gain(float): Gain (default: 2.0)
Dynamic parameter change example:
ros2 param set /temas_camera_vis set_exposure_time 20000ros2 param set /temas_camera_vis set_brightness 60- Published Topics:
temas/camera_vis/image_raw(sensor_msgs.msg.Image) – live camera framesExample:
ros2 topic echo /temas/camera_vis/image_rawtemas/camera_vis/status(std_msgs.msg.Bool) – frame status (True if frame received)ros2 topic echo /temas/camera_vis/statustemas/camera_vis/info(std_msgs.msg.String) – connection info messagesros2 topic echo /temas/camera_vis/info
- Usage Example:
Start the node with default parameters:
ros2 run temas_ros2 camera_visChange camera exposure at runtime:
ros2 param set /temas_camera_vis set_exposure_time 25000View live images:
ros2 run rqt_image_view rqt_image_viewThen select topic /temas/camera_vis/image_raw.
- Notes:
The node automatically starts a background thread to continuously fetch frames.
Status topic indicates whether frames are successfully received.
All camera settings can be updated dynamically via ROS2 parameters.
- try_connect()[source]¶
Attempt to connect to the TEMAS camera.
This method establishes connection, starts the camera streaming thread, and applies the initial camera settings.
- apply_camera_settings()[source]¶
Apply the current parameters to the camera.
Methods from temas.Camera used:
set_exposure_time(microseconds: 50–33000) -> str: sets exposure
set_brightness(0–100) -> str: sets brightness
set_contrast(0–100) -> str: sets contrast
set_lens_position(0–100) -> str: sets lens position
set_saturation(0–100) -> str: sets saturation
set_gain(1.123–16.0) -> str: sets gain
- parameter_callback(params)[source]¶
Handle runtime parameter changes.
Updates camera settings immediately when parameters are changed.
- Parameters:
params (list[rclpy.Parameter]) – List of parameters being updated.
- Returns:
Result of parameter update
- Return type:
SetParametersResult