8 Replies Latest reply on Oct 4, 2017 5:52 PM by JayFrancis Branched to a new discussion.

    Euclid Realsense ROS SLAM Demo

    JayFrancis

      Hi,

       

      Is there a recommended SLAM demo for ROS on the Euclid?  One that actually builds maps that can be displayed with rViz?

       

      I saw pointers to the R300 RealSense SLAM samples in a prior message thread.

       

      Specifically, using code from here: GitHub - IntelRealSense/realsense_samples_ros: Sample code illustrating how to develop ROS applications using the Intel®…

       

      Once I eliminated the realsense_ros_object piece of the project (as noted in a different thread that the "object" headers aren't in the current Euclid distribution), I was able to build the samples and run the SLAM demo.

       

      However, the SLAM code doesn't actually start (rViz runs, but is not receiving any map messages).  I can also tell it's not working because I never even get the "Starting SLAM..." info message on the console.

       

      I suspect there are subtle issues, such as which topics the sample code expects to have accel and gyro samples published.

       

      Before I really beat myself up trying to figure out what I may be doing wrong (or right), can someone from Intel give me at least a thumbs up or down whether any of this should work?

       

      It would be really great to have a working SLAM example for the Euclid...  Or, at least a promise of one soon.

       

      Thanks,

      Jay

        • 1. Re: Euclid Realsense ROS SLAM Demo
          JayFrancis

          After some digging, I see that the Euclid release of realsense_sp_nodelet.cpp (https://github.com/IntelEuclid/realsense_sp) exists and does make Euclid specific changes for the IMU.  It also has a nice block of code commented out that would handle the occupancy map building.

           

          So - is this being worked on?

           

          Thanks,

          Jay

          • 2. Re: Euclid Realsense ROS SLAM Demo
            MajdS

            Hi,

             

            You are right, you can see the code of the realsense_sp_nodelet.cpp, and the part of getting the occupancy map is commented out, you are welcome to uncomment it and try running it, though, there are some modifications needed to send it as "ROS" map ..

            Another option is to check the public realsense slam wrapper, they already doing the ROS map you need: realsense_samples_ros/slam_nodelet.cpp at kinetic-devel · IntelRealSense/realsense_samples_ros · GitHub

             

            Best,

            Majd (Intel)

            • 3. Re: Euclid Realsense ROS SLAM Demo
              JayFrancis

              Thanks Majd,

               

              At least I know I'm looking in the right places   I'll see what I can do.

               

              --Jay

              • 4. Re: Euclid Realsense ROS SLAM Demo
                JayFrancis

                I hacked the occupancy map code from the public RealSense slam wrapper into the Euclid realsense_sp nodelet.  It took just a few changes, and appears to work.  Now I can show an occupancy map using rViz.

                 

                Here's a link to my forked copy of realsense_sp:

                https://github.com/robojay/realsense_sp

                 

                I put basic instructions in the README how to get it going.  I am a total ROS newbie...  there could be typos/problems/etc.

                 

                --Jay

                • 5. Re: Euclid Realsense ROS SLAM Demo
                  JayFrancis

                  A few updates have been made to the demo code. 

                   

                  - Christiaan20 / Intermodalics corrected/added info for camera and odometry links.  This allows you to look at the Euclid's position guesstimate along with the map. 

                   

                  - Once I had Christiaan20's changes, I realized the map orientation (x-y) didn't map to ROS' normal orientation.  This has been corrected (see the code).

                   

                  - Christiaan20 also exposed more items in the Realsense Slam API.  I've brought some out as configurable parameters.

                   

                  --Jay

                  • 6. Re: Euclid Realsense ROS SLAM Demo
                    Georgge

                    JayFrancis I'm having trouble using your realsense fork. I obviously have the one provided by default by Intel, I don't know if it's causing some problems to have both. When I run yours, the map in RViz stays gray and I don't manage to get around that issue. Could you shed some light on this topic? Because I'm sure I must do something wrong. Besides, I don't find a way to know if what I'm launching (though I made sure I'm in the catkin_ws) is the default one or yours.

                    Thanks in advance

                    • 7. Re: Euclid Realsense ROS SLAM Demo
                      JayFrancis

                      I'm having trouble getting it working again too.  I even went back through a few different check-ins just in case something broke recently and didn't get caught.  Sorry - I'll plug away at it and see if I can figure out what's wrong (or, what I'm doing wrong).

                       

                      --Jay

                      • 8. Re: Euclid Realsense ROS SLAM Demo
                        JayFrancis

                        Georgge:

                         

                        I was able to get it working again on my Euclid.  Unless you cloned my experimental realsense_camera driver too, you probably aren't having the same issue I was ;-)  If you did clone my driver, you need to delete it and clean out the workspace.  There are some incompatibilities I need to deal with.

                         

                        Assuming you aren't using my camera driver...

                         

                        After launching realsense_sp, make sure the SLAM status is not "low" before checking on the map.  It should be "med" or "high".    You will need to move the Euclid around the environment a bit before it changes from "low" to something else.  Be sure to operate in a visually "stimulating" environment and have good lighting.

                         

                        You can check the SLAM status by running "rostopic echo /realsense/slam/status"

                         

                        Also, you will know that you're running the mapping version of realsense_sp (and not the original version) by watching the INFO messages at launch.  You will see a number of map related messages (map_width, map_height, etc.). 

                         

                        Let me know how you make out.

                         

                        --Jay