10 Replies Latest reply on Dec 11, 2017 4:22 AM by Georgge

    Save fixed_frame of Euclid

    Georgge

      Hi there,

       

      I'm trying to display a previously stored PointCloud2 scene in RViz, but I found out that unless I have my Euclid connected, RViz doesn't know  what the fixed_frame "camera_depth_frame" is (obviously), therefore not displaying anything. That's why I need to know if there's any way to save the tf that the Euclid makes to its PointClouds so I can display it again offline.

       

      Thanks!

        • 1. Re: Save fixed_frame of Euclid
          MeitavKleinfeld

          Hi George,

           

          You can use rosbag record <topics_you_want_to_save>, to register any of the topics you need to use with rviz, then replay them again from any device with rosbag play <rosbag_filename>

          Let me know if that's what you wanted to do.

           

          Regards,

           

          Meitav

          Intel Euclid Development Team

          • 2. Re: Save fixed_frame of Euclid
            Georgge

            Hi Meitav,

             

            I was thinking more of using pcl_ros's pointcloud_to_pcd, but making it self-containing, i.e, being able to replay the data in any kind of machine with, say, map / world fixed frame (it really can be anything, I just want it to be oriented the way it was when storing the data)

             

            Thanks in advance.

            • 3. Re: Save fixed_frame of Euclid
              MeitavKleinfeld

              Hi George,

               

              You can do all that with rosbag, unless I'm missing something or not understanding something. As long as it's a ros topic, you can record it into one rosbag and play it again on any machine you want.

               

              Meitav

              Intel Euclid Development Team

              • 4. Re: Save fixed_frame of Euclid
                Georgge

                Hi there,

                 

                with rosbag, what I'm actually doing is "recording a video" of my pointcloud. What I want to do, instead, is saving XYZ values of each point of a single frame of my interest. That way I can work with that data with the PCL Library, and, unless I'm mistaken, rosbag doesn't record data in such easy format (correct me if I'm wrong).

                 

                Thanks

                • 5. Re: Save fixed_frame of Euclid
                  MeitavKleinfeld

                  Hi George,

                   

                  Okay, so you basically want to grab a single pointcloud message and dump it into a file? That shouldn't be too hard, yeah. What you basically need to do is create a rosnode that subscribes to the topic and exports any messages there into a simple file format for you to use.

                  Rosbag essentially records the messages in the topics and replays them as they were. It's not something you can use to dump images for processing in, say, matlab.

                  I actually intend on posting a rosnode that records the different topics into easy file formats for post processing but it is currently in testing.

                   

                  Regards,

                   

                  Meitav

                  Intel Euclid Development Team

                  • 6. Re: Save fixed_frame of Euclid
                    Georgge

                    Hi Meitav,

                     

                    Exactly. Grabbing those points isn't a problem. The thing is that I have to use somehow a tf in order to save them in my desired orientation. I already managed to save a PCD file (http://wiki.ros.org/pcl_ros) . Problem is, as soon as I disconnect the Euclid, that fixed frame "camera_depth_frame" is lost, and when displaying that PCD file, it appears to be upside down, or maybe 90 degrees rotated, it depends. So that's why I'm asking if there's any way to store it with an already-correct orientation.

                     

                    Thanks

                    • 7. Re: Save fixed_frame of Euclid
                      MeitavKleinfeld

                      Hi George,

                       

                      First off I apologize for the late reply, I haven't been available in the last week and I appreciate your patience.

                      If you can register the matching camera_depth_frame that corresponds to the pcd file, then you should be all set.

                      You could also try and use /tf topic that can be published by the realsense_slam node, but I'm not sure if it correlates to the pointcloud you were trying to register.

                       

                      Regards,

                       

                      Meitav

                      Intel Euclid Development Team

                      • 8. Re: Save fixed_frame of Euclid
                        Georgge

                        Hi Meitav,

                         

                        Don't worry for your late reply, I'm grateful for your help. Unfortunately, I don't understand what you mean by "register the matching camera_depth_frame that corresponds to the pcd file". How can I do that? Is there a parameter in pcl_ros or should I write a code specifically to it?

                         

                        Thanks in advance.

                        • 9. Re: Save fixed_frame of Euclid
                          MeitavKleinfeld

                          Hi George,

                           

                          I think you'd need to write specific code for this. If you are running the slam rosnode for Euclid, you should be able to save data from the /tf topic, and I think it will give you the position that you were looking for.

                           

                          Meitav

                          Intel Euclid Development Team

                          • 10. Re: Save fixed_frame of Euclid
                            Georgge

                            Hi Meitav,

                             

                            Thanks for taking the time. I think everything's clear now.

                             

                            Greetings.