Robot Operating System and LP-Research IMUs? Simple!

NOTE: We have released a new version of our ROS / ROS 2 driver, please refer to this post.


Introduction

Robot Operating System (ROS) is a tool commonly used in the robotics community to pass data between various subsystems of a robot setup. We at LP-Research are also using it in various projects, and it is actually very familiar to our founders from the time of their PhDs. Inertial Measurement Units are not only a standard tool in robotics, the modern MEMS devices that we are using in our LPMS product line are actually the result of robotics research. So it seemed kind of odd that an important application case for our IMUs was not covered by our LpSensor software: namely, we didn’t provide a ROS driver.  We are very happy to tell you that such a driver exists, and we are happy that we don’t have to write it ourselves: the Larics laboratory at the University of Zagreb are avid users of both ROS and our LPMS-U2 sensors. So, naturally, they developed a ROS driver which they provide on their github site.  Recently, I had a chance to play with it, and the purpose of this blog post is to share my experiences with you, in order to get you started with ROS and LPMS sensors on your Ubuntu Linux system.

Installing the LpSensor Library

Please check our download page for the latest version of the library, at the time of this writing it is 1.3.5. I downloaded it, and then followed these steps to unpack and install it:

I also installed libbluettoth-dev, because without Bluetooth support, my LPMS-B2 would be fairly useless.

Setting up ROS and a catkin Work Space

If you don’t already have a working ROS installation, follow the ROS Installation Instructions to get started. If you already have a catkin work space you can of course skip this step, and substitute your own in what follows.  The work space is created as follows, note that you run catkin_init_workspace inside the src sub-directory of your work space.

Downloading and Compiling the ROS Driver for LPMS IMUs

We can now download the driver sources from github. It optionally makes use of and additional ROS module by the Larics laboratory which synchronizes time stamps between ROS and the IMU data stream.  Therefore, we have to clone two git repositories to obtain all prerequisites for building the driver.

That’s it, we are now ready to run catkin_make to get everything compiled and ready.  Building was as simple as running catkin_make, but you should setup the ROS environment before that.  If you haven’t, here’s how to do that:

This should go smoothly. Time for a test.

Not as Cool as LpmsControl, but Very Cool!

Now that we are set up, we can harness all of the power and flexibility of ROS. I’ll simply show you how to visualize the data using standard ROS tools without any further programming.  You will need two virtual terminals.  In the first start roscore, if you don’t have it running yet.  In the second, we start rqt_plot in order to see the data from our IMU, and the lpms_imu_node which provides it.  In the box you can see the command I use to connect to my IMU. You will have to replace the _sensor_model and _port strings with the values corresponding to your device.  Maybe it’s worth pointing out that the second parameter is called _port, because for a USB device it would correspond to its virtual serial port (typically /dev/ttyUSB0).

Once you enter these commands, you will then see the familiar startup messages of LpSensor as in the screenshot below. As you can see the driver connected to my LPMS-B2 IMU right away. If you cannot connect, maybe Bluetooth is turned off or you didn’t enter the information needed to connect to your IMU.  Once you have verified the parameters, you can store them in your launch file or adapt the source code accordingly.

Screenshot starting LPMS ROS node

Screenshot of starting the LPMS ROS node

The lpms_imu_node uses the standard IMU and magnetic field message types provided by ROS, and it publishes them on the imu topic.  That’s all we need to actually visualize the data in realtime.  Below you can see how easy that is in rqt_plot. Not as cool as LpmsControl, but still fairly cool. Can you guess how I moved my IMU?

animation of how to display LPMS sensor data in ROS

Please get in touch with us, if you have any questions, or if you found this useful for your own projects.

Update: Martin Günther from the German Research Center for Artificial Intelligence was kind enough to teach me how to pass ROS parameters on the command line.  I’ve updated the post accordingly.

New Miniature Sensor In: LPMS-ME1 Maker Edition!

20160808lpmsme1onfinger600x400_1

The LPMS-ME1’s Maker Edition is miniature-sized with just 12 x 12 x 2.6 mm.

We proudly present you our latest development! The LPMS-ME1 is our smallest motion sensor so far, with just 12 x 12 x 2.6 mm it is tiny! Despite its size this powerful 9-axis inertial measurement unit (IMU) has several sensors integrated, for example a 3-axis accelerometer, a 3-axis gyroscope and a 3-axis magnetometer. And this miniature motion sensor certainly comes at low cost.

It is very easy to assemble and can be conveniently embedded in the system of your choice. Due to its size it is perfect for your design ideas and development projects. Just to to give you some inspiration, it can be used for human motion capture or sports performance evaluation, for various sorts of Internet of Things (IoT) devices, and can be used to control unmanned aerial vehicles. You can even fly a drone with it!

Have a look at more specifications in our data sheet. This sensor comes with our own LpmsControl utility software and a one-year warranty service.

Get the LPMS-ME1 Maker Edition for your own innovations! Find a distributor of your choice or order online at Zenshin Tech.

20160808lpmsme1_box_600x400

 

New Distributor: Visit The Zenshin Tech Shop For Our Motion Sensors

Zenshin Tech screenshot

New worldwide distribution by Zenshin Technology Ltd

Getting our IMU sensors online has just become so much easier. Create your own innovations and simply order at our new worldwide distributor: Zenshin Technology Ltd is an online shop operating from Hong Kong. Have a look at our next generation IMUs and explore the optimized features of for example, the LPMS-CURS2 (9-axis motion sensor with USB, CAN bus and UART connectivity) or the LPMSs-CANAL2 (9-axis IMU with CAN connectivity and waterproof housing).

In addition to our distributors in every region, you can get LP-RESEARCH’s IMU sensors now from Zenshin Tech. Order comfortably with worldwide express shipping from here: https://zenshin-tech.com

Our VR Headset In The News

Our booth caught TIA's eye.

Our booth caught TIA’s eye.

Tech in Asia Tokyo 2016 is over but we still get great responses from the fair. It was such an amazing day, thank you once more! Moreover TIA reported on us again, this time in their round-up of interesting booths. It was our new Virtual Reality headset that caught their eye because it made our booth “more attractive and interactive”. Indeed, many visitors were eager to get their hands on it.

If you would like to know more about how we use sensor fusion for VR headset tracking, watch our demo video over here. This is a just a preview, we will give you more updates in the next couple of weeks. In the meantime, read the round-up coverage on the Tech in Asia blog over here.

Tech in Asia Wrap-up

Our booth at TIA was pretty popular.

Our booth at TIA was pretty popular with lots of gadgets to explore.

Last week we set up our booth at the Tech in Asia Tokyo 2016 startup fair. During two days, Japanese and international founders, developers, marketing experts, investors, recruiters and many more roamed the two big halls at Shibuya Gardens Bellesalle. It was a great experience for us to get in touch with potential investors and network with industry experts.

At our booth we highlighted some of our technologies such as our new line of sensors. Besides providing a hands-on experience with our Inertial Measurement Units (IMUs), we showcased our virtual reality headset and wireless controller. These use our sensor fusion technology to combine data from IMUs and a camera-based positioning system to obtain precise, reliable positioning and tracking for a room-scale VR system.

Our booth was pretty popular and throughout the day many curious visitors came to try out the wireless sensor function by themselves. They could hold our new LPMS-B2 Bluetooth sensor in their hands, turn it around and see its tracking in real time on a flatscreen.

See you again next year!

We gave a short presentation at TIA about sensor fusion and our new AR system.

We gave a short presentation at TIA about sensor fusion and our new AR system.

booth-with-customer-2

booth-with-customer

 

1 7 8 9 10 11 15