Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS2 send image to fastRTPS #1

Open
golizheh opened this issue Oct 30, 2019 · 1 comment
Open

ROS2 send image to fastRTPS #1

golizheh opened this issue Oct 30, 2019 · 1 comment

Comments

@golizheh
Copy link

Hej David,

I want to send message from ROS2 (cam2image) at the ROS2 demo exmaple to fastRTPS.

I have found IDL for this exmaple which is called Image.idl , Then I want to use fastrtpsgen to generate files for public and subscriber with IDL,
when I run
fastrtpsgen -example x64Linux2.6gcc Image.idl

It is return back me an error which is Uint is undefined.
My Image.IDL is looks like below:
// generated from rosidl_adapter/resource/msg.idl.em
// with input from sensor_msgs/msg/Image.msg

module sensor_msgs {
module msg {
/*
* This message contains an uncompressed image
* (0, 0) is at top-left corner of image
/
struct Image {
/

* Header timestamp should be acquisition time of image
* Header frame_id should be optical frame of camera
* origin of frame should be optical center of cameara
* +x should point to the right in the image
* +y should point down in the image
* +z should point into to plane of the image
* If the frame_id here and the frame_id of the CameraInfo
* message associated with the image conflict
* the behavior is undefined
*/
std_msgs::msg::Header header;

  /*
   * image height, that is, number of rows
   */
  uint32 height;

  /*
   * image width, that is, number of columns
   */
  uint32 width;

  /*
   * The legal values for encoding are in file src/image_encodings.cpp
   * If you want to standardize a new string format, join
   * ros-users@lists.ros.org and send an email proposing a new encoding.
   * Encoding of pixels -- channel meaning, ordering, size
   * taken from the list of strings in include/sensor_msgs/image_encodings.h
   */
  string encoding;

  /*
   * is this data bigendian?
   */
  uint8 is_bigendian;

  /*
   * Full row length in bytes
   */
  uint32 step;

  /*
   * actual matrix data, size is (step * rows)
   */
  sequence<uint8> data;
};

};
};

Is there any help

@woutervdhof
Copy link

Hi golizheh,

I ran into the same problem. It's a while back, but I think you can fix this by replacing uint32 by 'unsigned long'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants