ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

kabla002's profile - activity

2017-10-25 05:05:35 -0500 received badge  Famous Question (source)
2017-07-25 18:40:39 -0500 received badge  Famous Question (source)
2017-02-03 02:11:56 -0500 received badge  Notable Question (source)
2016-10-27 15:08:09 -0500 received badge  Good Question (source)
2016-10-24 08:52:00 -0500 received badge  Notable Question (source)
2016-08-23 06:16:49 -0500 received badge  Popular Question (source)
2016-08-05 09:58:57 -0500 received badge  Popular Question (source)
2016-06-27 10:09:02 -0500 answered a question Errors while building this in indigo

You will need to use catkin (the ROS build system) to generate the cmake file.

Checkout the catkin tutorial here .

You will need to...

  1. Setup a workspace (see the tutorials).
  2. Clone the git repository of the project you're interested in into the src folder of your catkin workspace.
  3. Install any missing dependencies . Dependencies are listed in the package.xml . If you need to build the dependency from source just put it in the src folder of your catkin workspace and catkin will automatically figure things out.
  4. Run the catkin build script. This will build and install the project so you dont need to manually run the cmake files.

catkin_make install

Good luck.

2016-06-23 08:13:31 -0500 received badge  Famous Question (source)
2016-06-22 17:53:40 -0500 received badge  Editor (source)
2016-06-22 17:51:47 -0500 asked a question Message Serialization for Rosbags

Hi Everyone,

My ultimate goal, is to read read a rosbag it into MATLAB, create a new topic based on the messages in the bag then write all of the messages out (including those from the old bag file) to a new bag file. After some searching I am unable to find any support for writing to a rosbag in the MATLAB Toolkit.

I'm considering writing my own ros bag writer and I've found the following that I believe will help.

  1. Rosbag format documentation
  2. Java library for rosbags (jrosbag) that seems to handle all of the details of indexes and chunks etc.

Using jrosbag I think I can write out the bag messages as long as I am able to convert the MATLAB version of the messages into properly serialized binary.

My questions are as follows...

  • How are are the various ros messages serialized? the rosbag format documentation doesn't give this information, and I haven't been able to find any documentation on the wiki.
  • Does this seem reasonable, are there any reasons this approach wouldn't allow me to add new topics to a rosbag?


~ John

2016-06-22 16:32:13 -0500 asked a question Writing a rosbag in MATLAB

Hi Everyone,

I'm trying read a rosbag it into MATLAB, create a new topic based on the messages in the bag then write all of the messages out (including those from the old bag file) to a new bag file. I am able to accomplish reading of the bag file using the following MATLAB toolkit. But this toolkit does not appear to support writing rosbags.

My questions are as follows.

  1. Is anyone aware of a MATLAB tool that would allow me to write message to a rosbag in MATLAB?
  2. I'm considering trying to write my own robag writer in MATLAB is there any reason that this would be a bad idea?

My apologies for repeating this question but there weren't any answers with useful information.


~ John

2016-05-23 18:04:58 -0500 received badge  Enthusiast
2016-05-21 01:16:53 -0500 commented answer PointCloud2 and PointField

Thank you again! Your description and example were very helpful. Seems to me your answer should be added to the documentation.

2016-05-20 12:29:54 -0500 received badge  Notable Question (source)
2016-05-19 12:06:23 -0500 commented answer PointCloud2 and PointField

Thanks for your reply! The is dense field makes sense to me now and I will use the image message instead. The count property of the fields is still a bit confusing, It might be helpful if you wanted a field that was longer than a double or 3 bytes long or something like that, does that make sense?

2016-05-19 11:40:34 -0500 received badge  Supporter (source)
2016-05-17 09:14:18 -0500 received badge  Popular Question (source)
2016-05-17 07:34:15 -0500 received badge  Nice Question (source)
2016-05-17 04:16:12 -0500 received badge  Student (source)
2016-05-17 00:01:23 -0500 asked a question PointCloud2 and PointField

The documentation on the PointCloud2 and PointField messages is a bit sparse and I'm having some difficulty understanding it. I've found the following documentation for these messages PointCloud2 PointField.

If we want to send a 2d image (320x240 pixels) with depth & intensity data that are both floats, I imagine we the object should be populated like this (note this is only pseudo code so there are syntax errors) but its not clear to me if this is completely correct.

PointCloud2 msg;

msg.height = 240;
msg.width = 320;

msg.point_step = 8;
msg.row_step = msg.width*msg.point_step; 
msg.is_bigendian = false;

bool is_dense = true;

msg.fields[0].name = "depth";
msg.fields[0].offset = 0;
msg.fields[0].datatype = FLOAT32;
msg.fields[0].count = ???;

msg.fields[1].name = "intensity";
msg.fields[1].offset = 0;
msg.fields[1].datatype = FLOAT32;
msg.fields[1].count = ???;

int byteIdx = 0
for(i = 0; i < depth.size();i++) 
{[byteIdx++].count = (uint8_t)(depth[i] >>0);[byteIdx++].count = (uint8_t)(depth[i] >>8);[byteIdx++].count = (uint8_t)(depth[i] >>16);[byteIdx++].count = (uint8_t)(depth[i] >>24);[byteIdx++].count = (uint8_t)(intensity[i] >>0);[byteIdx++].count = (uint8_t)(intensity[i] >>8);[byteIdx++].count = (uint8_t)(intensity[i] >>16);[byteIdx++].count = (uint8_t)(intensity[i] >>24);

So my primary questions are ...

  1. What is the count value for a field ? Seems to me that this should always be set to 1, when would this not be set to 1?
  2. What is the purpose of the is_dense field? Does it change how the bytes should be formatted in the property?
  3. Are there any examples of populating this message or additional documentation that people could point me to?