I’m new here and I’m currently trying to convert ROS image messages to Isaac image messages.
I want to visualize the camera stream from my robot simulation in Isaac Sight.
Can anyone help/guide me ?
Thanks in advance!
This is what I wrote so far
#include “RosToCameraImage.hpp”
#include
#include
#include “engine/gems/image/io.hpp”
#include “messages/camera.hpp”
#include “messages/image.hpp”
namespace isaac {
namespace ros_bridge {
bool RosToCameraImage::rosToProto(const sensor_msgs::Image::ConstPtr& ros_message,
ColorCameraProto::Builder builder,
std::vectorisaac::SharedBuffer& buffers){
ImageConstView3ub image;
// Read from ros message
image.cols()= ros_message->width;
image.rows()= ros_message->height;
image.channels() = ros_message->step / ros_message->width;
image.dataBufferIndex() = buffers.size();
ToProto(std::move(image), builder);
return true;
}
} // namespace ros_bridge
} // namespace isaac