ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

xsens_driver error

asked 2013-07-19 01:01:55 -0500

pmarinplaza gravatar image

updated 2013-07-23 01:22:21 -0500

  1. Linux: Ubuntu 12.04 LTS 32bits
  2. ROS: fuerte
  3. Intel core 2 duo E8400
  4. device: Xsens MTi-G-28A53G35

I have some troubles when I launch mtdevice.py from http://ros.org/wiki/xsens_driver

I did as it said in http://answers.ros.org/question/42328/problem-with-xsens-mtig/ and I am sure making:

$ ls -la /dev/ttyUSB0 
$ sudo chmod a+rw /dev/ttyUSB0

And getting:

crw-rw-rw- 1 root dialout 188, 0 Jul 19 12:35 /dev/ttyUSB0

With all permissions.

The output problem is this:

$ rosrun xsens_driver mtdevice.py 
  File "/home/lsi-ros/workspace/sandbox/ethzasl_xsens_driver/xsens_driver/nodes/mtdevice.py", line 63
    print "MT: Write message id 0x%02X (%s) with %d data bytes: [%s]"%
                                                                     ^
SyntaxError: invalid syntax

I try with the launch too:

$ roslaunch lse_xsens_mti xsensDriver.launch

And the output is the same. Are there any problem with the code? Have I some broken dependency?

Thanks

Edit 1(22/07/2013):

The output of the roslaunch xsens_driver xsens_driver.launch is:

lsi-ros@lsi-ros:~/workspace/sandbox/lse_imu_drivers/lse_xsens_mti$ roslaunch xsens_driver xsens_driver.launch 
... logging to /home/lsi-ros/.ros/log/286c5d6e-f2c3-11e2-9adc-00241d11fce4/roslaunch-lsi-ros-10286.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server <a href="http://lsi-ros:60064/">http://lsi-ros:60064/</a>

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /xsens_driver/frame_id

NODES
  /
    xsens_driver (xsens_driver/mtnode.py)

auto-starting new master
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[master]: started with pid [10302]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 286c5d6e-f2c3-11e2-9adc-00241d11fce4
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[rosout-1]: started with pid [10315]
started core service [/rosout]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[xsens_driver-2]: started with pid [10327]
Traceback (most recent call last):
  File "/home/lsi-ros/workspace/sandbox/ethzasl_xsens_driver/xsens_driver/nodes/mtnode.py", line 6, in <module>
    import mtdevice
  File "/home/lsi-ros/workspace/sandbox/ethzasl_xsens_driver/xsens_driver/nodes/mtdevice.py", line 63
    print "MT: Write message id 0x%02X (%s) with %d data bytes: [%s]"%
                                                                     ^
SyntaxError: invalid syntax
[xsens_driver-2] process has died [pid 10327, exit code 1, cmd /home/lsi-ros/workspace/sandbox/ethzasl_xsens_driver/xsens_driver/nodes/mtnode.py __name:=xsens_driver __log:=/home/lsi-ros/.ros/log/286c5d6e-f2c3-11e2-9adc-00241d11fce4/xsens_driver-2.log].
log file: /home/lsi-ros/.ros/log/286c5d6e-f2c3-11e2-9adc-00241d11fce4/xsens_driver-2*.log

And my roswtf is:

    lsi-ros@lsi-ros:~$ roswt
roswt: command not found
lsi-ros@lsi-ros:~$ roswtf
Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:

Found 2 error(s).

ERROR Not all paths in ROS_PACKAGE_PATH [/home/lsi-ros/workspace/amor-ros-pkg:/home/lsi-ros/workspace/dev:/home/lsi-ros/workspace/sandbox:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros] point to an existing directory: 
 * /home/lsi-ros/workspace/amor-ros-pkg

ERROR Not all paths in PYTHONPATH [/opt/ros/fuerte/share/ros/core/roslib/src:/opt/ros/fuerte/lib/python2.7/dist-packages:] point to a directory: 
 * /opt/ros/fuerte ...
(more)
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2014-03-28 20:28:20 -0500

sai gravatar image

Configuring xsens_driver for XSENS IMU in ROS Here I employ xsens MTI-G IMU which is orange in colour.

I am working in ROS FUERTE on ubuntu 12.04 using the xsens_driver package that ships in ethzasl_xsens_driver.

I tried to get all the relevant data from IMU namely orientation orientation covariance angular velocity angular velocity covariance linear acceleration linear acceleration covariance

Configuration steps

  1. Attach IMU via USB
  2. sudo chmod 777 /dev/ttyUSB0
  3. rosrun xsens_driver mtdevice.py --configure --output-mode=coapvs --output-settings=tqMAG

The above command should result in something like this Configuring mode and settings Ok

Running the driver

  1. roslaunch xsens_driver xsens_driver.launch

  2. rostopic echo /imu/data

Then it should display header: seq: 166 stamp: secs: 1396073832 nsecs: 314651012 frame_id: /imu orientation: x: -0.00116935407277 y: -0.0249380189925 z: 0.306782633066 w: 0.95145213604 orientation_covariance: [0.017453292519943295, 0.0, 0.0, 0.0, 0.017453292519943295, 0.0, 0.0, 0.0, 0.15707963267948966] angular_velocity: x: 0.00783694628626 y: -0.0136562986299 z: 0.00587089639157 angular_velocity_covariance: [0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824] linear_acceleration: x: 0.347801417112 y: -0.202733114362 z: 9.81818389893 linear_acceleration_covariance: [0.0004, 0.0, 0.0, 0.0, 0.0004, 0.0, 0.0, 0.0, 0.0004] ---

Good day!

edit flag offensive delete link more

Comments

1

Perfect, I missed the step of configuration and this gave me bad lectures. Thank you very much. Best regards

pmarinplaza gravatar image pmarinplaza  ( 2014-04-02 22:14:18 -0500 )edit

Hi, I also use an xsens MTI-G 700 on ubuntu 12.04. I use the xsens_driver from the hydro debs and have the problem, that the configuration call "rosrun xsens_driver mtdevice.py --configure --output-mode=coapvs --output-settings=tqMAG" causes both the mtdevice.py as well as the node to fail have parsing problems: "MT error: could not parse MTData message" does anybody have an idea? both work fine when I use: rosrun xsens_driver "mtdevice.py -c -s 0x1 -m 0x4"

Georg gravatar image Georg  ( 2014-04-30 04:29:00 -0500 )edit
0

answered 2013-07-19 01:40:38 -0500

dornhege gravatar image

updated 2013-07-23 01:25:58 -0500

This looks like its using python 3 instead of python 2.

What do you get for python --version?

With the full source lines, it looks like it might really be a syntax error. Can you try pulling the opening ( in the line after the %?

edit flag offensive delete link more

Comments

lsi-ros@lsi-ros:~$ python --version /////// and I get: Python 2.7.3 ///// I think there are something wrong with the code. Is it possible that my python version in ROS are different from my installed version in ubuntu 12.04?

pmarinplaza gravatar image pmarinplaza  ( 2013-07-21 22:14:37 -0500 )edit

Can you maybe post the surrounding lines? I'm assuming the code continues after the %

dornhege gravatar image dornhege  ( 2013-07-22 01:31:11 -0500 )edit

The only other solution would be that there is a `from __future__ import print_function` somewhere in the code.

dornhege gravatar image dornhege  ( 2013-07-22 01:31:55 -0500 )edit
0

answered 2013-07-23 01:52:38 -0500

pmarinplaza gravatar image

Finally I try with this package:

http://www.ros.org/wiki/lse_xsens_mti

And before update the firmware (from 2.5 to 2.6.x) the sensor works very good.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-19 01:01:55 -0500

Seen: 3,853 times

Last updated: Mar 28 '14