Undefined function 'readImage' for input arguments of type 'double'. in PickandPlaceWorkflowInGazeboUsingROSExample.mlx
Show older comments
When running the PickandPlaceWorkflowInGazeboUsingROSExample.mlx file along with the virtual machine from https://www.mathworks.com/help/robotics/examples/pick-and-place-workflow-in-gazebo-using-ros.html. I come across:
Undefined function 'readImage' for input arguments of type 'double'.
However, readImage is a function that exists and is defined and I can run the example from: https://www.mathworks.com/help/ros/ref/readimage.html
I have looked at the input from the example file:exampleCommandDetectPartsROSGazebo.m and it crashes on:
% Read image from simulated Gazebo camera
rgbImg = readImage(coordinator.ROSinfo.rgbImgSub.LatestMessage);
Where readImage should be a ROS msg, but
coordinator.ROSinfo.rgbImgSub.LatestMessage = [] which is of type double.
Am I running the example wrong? shouldn't coordinator.ROSinfo.rgbImgSub.LatestMessage be of type ROS image message?
1 Comment
Walter Roberson
on 28 Mar 2020
I would think that it needs a character vector, but at that point the latest character vector is empty. It is common for routines to return [] when they do not succeed, as commonly people just test isempty()
Accepted Answer
More Answers (0)
Categories
Find more on Network Connection and Exploration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!