Ask Your Question
1

Clearpath Jackal rostopic echo /imu/mag Giving only vlaues of 0

asked 2021-11-08 09:59:18 -0500

sageedwards gravatar image

updated 2021-11-09 13:06:18 -0500

Good morning,

So after spending a few days trying to debug my code for waypoint navigation I stumbled onto what I believe is an error in either the hardware of the system or its configuration. It seems that the IMU is not working properly, when I rostopic echo /imu/mag I get the following:

X: 0.0 Y: 0.0 Z: 0.0

for all running time.

With that, I tried to do an IMU calibration with the following command: rosrun jackal_base calibrate_compass, but I get the following error:

Unable to compute calibration from recorded bag.

So I looked into the output file from this calibration attempt and the .log file has the following error in it:

AttributeError: '_sensor_msgs_MagneticField' object has no attributes

Further, I also have another jackal (both just recently received) and I get the same result on that one as well.

Thanks for you help and suggestion,

Sage

Requested info:

rosnode info /imu_filter

Node [/imu_filter] Publications: * /imu/data [sensor_msgs/Imu] * /imu_filter/parameter_descriptions [dynamic_reconfigure/ConfigDescription] * /imu_filter/parameter_updates [dynamic_reconfigure/Config] * /rosout [rosgraph_msgs/Log] * /tf [tf/tfMessage]

Subscriptions: * /imu/data_raw [sensor_msgs/Imu]

Services: * /imu_filter/get_loggers * /imu_filter/set_logger_level * /imu_filter/set_parameters

contacting node http://cpr-j100-0570:34629/ ... Pid: 1589 Connections: * topic: /rosout * to: /rosout * direction: outbound (44293 - 127.0.0.1:37358) [12] * transport: TCPROS * topic: /tf * to: /ekf_localization * direction: outbound (44293 - 127.0.0.1:37770) [11] * transport: TCPROS * topic: /imu/data * to: /ekf_localization * direction: outbound (44293 - 127.0.0.1:37892) [13] * transport: TCPROS * topic: /imu/data_raw * to: /jackal_node (http://cpr-j100-0570:35467/) * direction: inbound (59952 - cpr-j100-0570:53589) [15] * transport: TCPROS

rostopic info /imu/data_raw Type: sensor_msgs/Imu

Publishers: * /jackal_node (http://cpr-j100-0570:35467/)

Subscribers: * /jackal_node (http://cpr-j100-0570:35467/) * /imu_filter (http://cpr-j100-0570:34629/)

rostopic info /imu/data Type: sensor_msgs/Imu

Publishers: * /imu_filter (http://cpr-j100-0570:34629/)

Subscribers: * /ekf_localization (http://cpr-j100-0570:35941/)

ROS Graph: Do not have enough points...

edit retag flag offensive close merge delete

Comments

Can you pls run and show the output:

rosnode info /imu_filter
rostopic info /imu/data_raw
rostopic info /imu/data
rosrun rqt_graph rqt_graph
osilva gravatar image osilva  ( 2021-11-08 11:55:20 -0500 )edit

Also please check this threads as it may give you some help: https://github.com/jackal/jackal_robo...

https://github.com/ccny-ros-pkg/imu_t...

osilva gravatar image osilva  ( 2021-11-08 11:56:47 -0500 )edit

@sageedwards You must successfully complete magnetic calibration to get magnetometer data on /imu/mag.

Did you run calibration as the clearpath user administrator? I believe that compass calibration does not work if run from a regular linux user account.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-08 12:26:28 -0500 )edit

@osilva The outputs of these commands are above, sorry about the delayed response.

sageedwards gravatar image sageedwards  ( 2021-11-09 13:06:45 -0500 )edit

@Mike Scheutzow I did run it as an adminstrator, in the ssh terminal. The robot spins and seems to do its thing

sageedwards gravatar image sageedwards  ( 2021-11-09 13:08:10 -0500 )edit

sorry @sageedwards i should have asked, what IMU do you have? For Jackal I know, they use: 3DM-GX3® -25 but not sure if that's the one you are using. With the 3DM-GX3-25 there is an issue with the driver but that's an older generation: https://answers.ros.org/question/2207...

osilva gravatar image osilva  ( 2021-11-09 13:47:16 -0500 )edit

Create a new file /opt/ros/melodic/etc/jackal_base/mag_config.yaml with this content:

# Generated from /tmp/calibrate_compass.RoZx/imu_record.bag on 2020-06-21.
use_mag: true
mag_bias_x: 0.000000000
mag_bias_y: 0.000000000
mag_bias_z: 0.000000000

and reboot the robot. Are there non-zero values on /imu/mag ?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-09 15:06:30 -0500 )edit

@osilva I am sorry, but I do not know which IMU I have, how can I find this info, because I do not see it in the documentation I was given.

sageedwards gravatar image sageedwards  ( 2021-11-09 15:35:25 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-11-16 09:29:46 -0500

sageedwards gravatar image

On the stock IMUs that come with the Jackal, the magnetometer is deactivated due to its close proximity with the motors (EMF interference).

This info was given to me from a Clearpath representative.

edit flag offensive delete link more

Comments

Interesting. Thank you for sharing. Should be added to the manual

osilva gravatar image osilva  ( 2021-11-16 09:40:10 -0500 )edit

among many other things...

sageedwards gravatar image sageedwards  ( 2021-11-16 13:52:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-11-08 09:59:18 -0500

Seen: 39 times

Last updated: Nov 16 '21