ROS Interface Migration Guide (from 2.0.2 and below to 2.3.4 and Above)

You are currently viewing the documentation for the latest version (2.5.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

The latest ROS interfaces are only compatible with Mech-Eye SDK 2.3.4 or above. If you wish to keep using the existing ROS program after installing the latest version of Mech-Eye SDK, please modify the ROS program according to this topic.

Topics

In Mech-Eye SDK 2.3.4 and above, the following changes have been made to the topics of the ROS interfaces:

  • Depth map:

    2.0.2 and below 2.3.4 and above
    /mechmind/depth_image
    ros
    /mechmind/depth_map
    ros
  • Textured point cloud:

    2.0.2 and below 2.3.4 and above
    /mechmind/color_point_cloud
    ros
    /mechmind/textured_point_cloud
    ros

Services

In Mech-Eye SDK 2.3.4 and above, the following changes have been made to the services of the ROS interfaces:

Data Acquisition

  • Acquire the 2D image:

    2.0.2 and below 2.3.4 and above
    rosservice call /capture_color_map
    ros
    rosservice call /capture_color_image
    ros
  • Acquire the textured point cloud:

    2.0.2 and below 2.3.4 and above
    rosservice call /capture_color_point_cloud
    ros
    rosservice call /capture_textured_point_cloud
    ros

Adjust Camera Parameters

  • Obtain the value of Scan2DExpectedGrayValue:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_expected_gray_value
    ros
    rosservice call /get_int_parameter "{name: Scan2DExpectedGrayValue}"
    ros
  • Set the value of Scan2DExpectedGrayValue:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_expected_gray_value "{value: 20}"
    ros
    rosservice call /set_int_parameter "{name: Scan2DExpectedGrayValue, value:20}"
    ros
  • Obtain the value of Scan2DExposureMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_exposure_mode
    ros
    rosservice call /get_enum_parameter "{name: Scan2DExposureMode}"
    ros
  • Set the value of Scan2DExposureMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_exposure_mode "{value: HDR}"
    ros
    rosservice call /set_enum_parameter "{name: Scan2DExposureMode, value: HDR}"
    ros
  • Obtain the value of Scan2DHDRExposureSequence:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_exposure_sequence
    ros
    rosservice call /get_float_array_parameter "{name: Scan2DHDRExposureSequence}"
    ros
  • Set the value of Scan2DHDRExposureSequence:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_exposure_sequence "{sequence: [30.0,35.5,40.0]}"
    ros
    rosservice call /set_float_array_parameter "{name: Scan2DHDRExposureSequence, array: [30.0, 35.5, 40.0]}"
    ros
  • Obtain the value of Scan2DExposureTime:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_exposure_time
    ros
    rosservice call /get_float_parameter "{name: Scan2DExposureTime}"
    ros
  • Set the value of Scan2DExposureTime:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_exposure_time "{value: 35.5}"
    ros
    rosservice call /set_float_parameter "{name: Scan2DExposureTime, value: 35.5}"
    ros
  • Obtain the value of Scan2DROI:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_roi
    ros
    rosservice call /get_roi_parameter "{name: Scan2DROI}"
    ros
  • Set the value of Scan2DROI:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_roi "{x: 20, y: 20, width: 600, height: 800}"
    ros
    rosservice call /set_roi_parameter "{name: Scan2DROI, x: 20, y: 20, width: 600, height: 800}"
    ros
  • Obtain the value of Scan2DSharpenFactor:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_sharpen_factor
    ros
    rosservice call /get_float_parameter "{name: Scan2DSharpenFactor}"
    ros
  • Set the value of Scan2DSharpenFactor:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_sharpen_factor "{value: 0.5}"
    ros
    rosservice call /set_float_parameter "{name: Scan2DSharpenFactor, value: 0.5}"
    ros
  • Obtain the value of Scan2DToneMappingEnable:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_2d_tone_mapping
    ros
    rosservice call /get_bool_parameter "{name: Scan2DToneMappingEnable}"
    ros
  • Set the value of Scan2DToneMappingEnable:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_2d_tone_mapping "{value: True}"
    ros
    rosservice call /set_bool_parameter "{name: Scan2DToneMappingEnable, value: True}"
    ros
  • Obtain the value of Scan3DExposureSequence:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_3d_exposure
    ros
    rosservice call /get_float_array_parameter "{name: Scan3DExposureSequence}"
    ros
  • Set the value of Scan3DExposureSequence:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_3d_exposure "{sequence: [30.0,35.5,40.0]}"
    ros
    rosservice call /set_float_array_parameter "{name: Scan3DExposureSequence, array: [30.0, 35.5, 40.0]}"
    ros
  • Obtain the value of Scan3DGain:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_3d_gain
    ros
    rosservice call /get_float_parameter "{name: Scan3DGain}"
    ros
  • Set the value of Scan3DGain:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_3d_gain "{value: 2.5}"
    ros
    rosservice call /set_float_parameter "{name: Scan3DGain, value: 2.5}"
    ros
  • Obtain the value of Scan3DROI:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_3d_roi
    ros
    rosservice call /get_roi_parameter "{name: Scan3DROI}"
    ros
  • Set the value of Scan3DROI:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_3d_roi "{x: 20, y: 20, width: 600, height: 800}"
    ros
    rosservice call /set_roi_parameter "{name: Scan3DROI, x: 20, y: 20, width: 600, height: 800}"
    ros
  • Obtain the value of PointCloudOutlierRemoval:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_cloud_outlier_filter_mode
    ros
    rosservice call /get_enum_parameter "{name: PointCloudOutlierRemoval}"
    ros
  • Set the value of PointCloudOutlierRemoval:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_cloud_outlier_filter_mode '!!str Off'
    ros
    rosservice call /set_enum_parameter "{name: PointCloudOutlierRemoval, value: 'Off'}"
    ros
    The Off option must be surrounded by single quotation marks.
  • Obtain the value of PointCloudSurfaceSmoothing:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_cloud_smooth_mode
    ros
    rosservice call /get_enum_parameter "{name: PointCloudSurfaceSmoothing}"
    ros
  • Set the value of PointCloudSurfaceSmoothing:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_cloud_smooth_mode '!!str Off'
    ros
    rosservice call /set_enum_parameter "{name: PointCloudSurfaceSmoothing, value: 'Off'}"
    ros
    The Off option must be surrounded by single quotation marks.
  • Obtain the value of DepthRange:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_depth_range
    ros
    rosservice call /get_range_parameter "{name: DepthRange}"
    ros
  • Set the value of DepthRange:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_depth_range "{lower: 300, upper: 1000}"
    ros
    rosservice call /set_range_parameter "{name: DepthRange, lower: 300, upper: 1000}"
    ros
  • Obtain the value of FringeContrastThreshold:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_fringe_contrast_threshold
    ros
    rosservice call /get_int_parameter "{name: FringeContrastThreshold}"
    ros
  • Set the value of FringeContrastThreshold:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_fringe_contrast_threshold "{value: 3}"
    ros
    rosservice call /set_int_parameter "{name: FringeContrastThreshold, value: 3}"
    ros
  • Obtain the value of FringeMinThreshold:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_fringe_min_threshold
    ros
    rosservice call /get_int_parameter "{name: FringeMinThreshold}"
    ros
  • Set the value of FringeMinThreshold:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_fringe_min_threshold "{value: 3}"
    ros
    rosservice call /set_int_parameter "{name: FringeMinThreshold, value: 3}"
    ros
  • Obtain the value of LaserPowerLevel:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_laser_settings
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /get_int_parameter "{name: LaserPowerLevel}"
    ros
  • Set the value of LaserPowerLevel:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_laser_settings "{fringe_coding_mode: Fast, frame_range_start: 20, frame_range_end: 80, frame_partition_count: 2, power_level: 60}"
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /set_int_parameter "{name: LaserPowerLevel, value: 60}"
    ros
  • Obtain the value of LaserFringeCodingMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_laser_settings
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /get_enum_parameter "{name: LaserFringeCodingMode}"
    ros
  • Set the value of LaserFringeCodingMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_laser_settings "{fringe_coding_mode: Fast, frame_range_start: 20, frame_range_end: 80, frame_partition_count: 2, power_level: 60}"
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /set_enum_parameter "{name: LaserFringeCodingMode, value: Fast}"
    ros
  • Obtain the value of LaserFrameRange:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_laser_settings
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /get_range_parameter "{name: LaserFrameRange}"
    ros
  • Set the value of LaserFrameRange:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_laser_settings "{fringe_coding_mode: Fast, frame_range_start: 20, frame_range_end: 80, frame_partition_count: 2, power_level: 60}"
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /set_range_parameter "{name: LaserFrameRange, lower: 20, upper: 80}"
    ros
  • Obtain the value of LaserFramePartitionCount:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_laser_settings
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /get_int_parameter "{name: LaserFramePartitionCount}"
    ros
  • Set the value of LaserFramePartitionCount:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_laser_settings "{fringe_coding_mode: Fast, frame_range_start: 20, frame_range_end: 80, frame_partition_count: 2, power_level: 60}"
    ros
    This service sets the values of all the parameters in the Laser category.
    rosservice call /set_int_parameter "{name: LaserFramePartitionCount, value: 2}"
    ros
  • Obtain the value of AntiFlickerMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_projector_anti_flicker_mode
    ros
    rosservice call /get_enum_parameter "{name: AntiFlickerMode}"
    ros
  • Set the value of AntiFlickerMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_projector_anti_flicker_mode '!!str Off'
    ros
    rosservice call /set_enum_parameter "{name: AntiFlickerMode, value: 'Off'}"
    ros
    The Off option must be surrounded by single quotation marks.
  • Obtain the value of ProjectorFringeCodingMode:

    2.0.2 and below 2.3.4 and above
    • Models other than UHP-140-GL:

    rosservice call /get_projector_fringe_coding_mode
    ros
    • UHP-140-GL:

    rosservice call /get_uhp_fringe_coding_mode
    ros
    rosservice call /get_enum_parameter "{name: ProjectorFringeCodingMode}"
    ros
  • Set the value of ProjectorFringeCodingMode:

    2.0.2 and below 2.3.4 and above
    • Models other than UHP-140-GL:

    rosservice call /set_projector_fringe_coding_mode "{value: Accurate}"
    ros
    • UHP-140-GL:

    rosservice call /set_uhp_fringe_coding_mode "{value: Accurate}"
    ros
    rosservice call /set_enum_parameter "{name: ProjectorFringeCodingMode, value: Accurate}"
    ros
  • Obtain the value of ProjectorPowerLevel:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_projector_power_level
    ros
    rosservice call /get_enum_parameter "{name: ProjectorPowerLevel}"
    ros
  • Set the value of ProjectorPowerLevel:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_projector_power_level "{value: High}"
    ros
    rosservice call /set_enum_parameter "{name: ProjectorPowerLevel, value: High}"
    ros
  • Obtain the value of UhpCaptureMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /get_uhp_capture_mode
    ros
    rosservice call /get_enum_parameter "{name: UhpCaptureMode}"
    ros
  • Set the value of UhpCaptureMode:

    2.0.2 and below 2.3.4 and above
    rosservice call /set_uhp_capture_mode "{capture_mode: Merge}"
    ros
    rosservice call /set_enum_parameter "{name: UhpCaptureMode, value: Merge}"
    ros

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.