Skip to main content

Camera

Sensor type that can generate an image or byte-string rendering the elements in the workspace.

Mandatory children

  • Width: Camera image width in pixels.

    • Var: smtk_int
    • Type: Input
    • Default: 800
  • Height: Camera image height in pixels.

    • Var: smtk_int
    • Type: Input
    • Default: 600
  • Near: Near clipping plane.

    • Var: smtk_float
    • Type: Input
    • Default: 0.1
  • Far: Far clipping plane.

    • Var: smtk_float
    • Type: Input
    • Default: 100
  • Format: Camera output format.

    • Var: smtk_camera_format_choice
    • Type: Input
    • Default: RGB
    • Possible values: Luminance:L Color:RGB Depth:D Color + Depth:RGBD
  • Publish mode: Camera publishing mode.

    • Var: smtk_camera_publish_choice
    • Type: Input
    • Default: disk
    • Possible values: disk ROS ftp
  • Publish setup: Json format string to provide setup information for the publishing method. Specific for each mode.

    • Var: smtk_string
    • Type: input
    • Default: {}
  • Publish status: String to provide status feedback for the publishing method. Specific for each mode.

    • Var: smtk_string
    • Type: output
    • Default: ""

Camera publish modes and setup parameters

General params:

  • "filename": You can give a specific name, otherwise the files will be called "Camera_1", "Camera_2", etc...
  • "timestamp": Activates or deactivates the introduction of timestamp in the file name, default False

"disk":

  • "path": Path to save the camera image, default: "". For copy .png file to specific folder use: C:/Users/"YourUsername"/"YourFileLocation/

"ftp":

  • "host": Ip address of the server, default: 127.0.0.1
  • "port": Port address, default: 21
  • "username": ftp user name, default: ""
  • "password": ftp user password, default: ""
  • "upload_path": Path to upload the file in the ftp server, default: "/"

"ROS":

  • "host": Ros server ip
  • "port": Ros server port
  • "topic": Ros topic for the picture
  • "message": Ros message, only allowed message type is "'sensor_msgs/CompressedImage"s

The parameters are defined by a dict that following the next format {parameter_name: parameter_value}, i.e:

{
"path":"",
"timestamp":"false",
"filename":"MyPicture"
}
note
  • All camera pictures will be saved to the disk to the Simumatik user folder /cameras. The name will be "Camera_X" where X is the camera number in the system, unless an specific "filename" parameter is passed

  • disk" mode: An additional copy of the file will be created in the given path if the "path" parameter is not "" (default). The "path" is just the directory, should not include the file name. If the "timestamp" parameter is true, the created file will include it.

  • "ftp" mode: the "host" (str), "port" (int), "username" (str) and "password" (str) parameters are not mandatory, they have default values. If "username" is "" then no login is performed. The "upload_path" (directory) needs to exist in the ftp server, we check it before we start sending pictures. The "upload_path" is just the directory, should not include the file name. If the "timestamp" parameter is true, the created file will include it.

  • "ROS" mode: A RoslibPy client will be created using the "host" and "port" parameters. If connected, it will publish to the given "topic" with the message type defined in "message". The images will be published without taking care of "filename" and "timestamp" params.