Clearpath Jackal rostopic echo /imu/mag Giving only vlaues of 0
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 jackalbase calibratecompass, 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: 'sensormsgs_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 [/imufilter] Publications: * /imu/data [sensormsgs/Imu] * /imufilter/parameterdescriptions [dynamicreconfigure/ConfigDescription] * /imufilter/parameterupdates [dynamicreconfigure/Config] * /rosout [rosgraph_msgs/Log] * /tf [tf/tfMessage]
Subscriptions: * /imu/dataraw [sensormsgs/Imu]
Services: * /imufilter/getloggers * /imufilter/setloggerlevel * /imufilter/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: /ekflocalization * direction: outbound (44293 - 127.0.0.1:37770) [11] * transport: TCPROS * topic: /imu/data * to: /ekflocalization * direction: outbound (44293 - 127.0.0.1:37892) [13] * transport: TCPROS * topic: /imu/dataraw * to: /jackalnode (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: * /jackalnode (http://cpr-j100-0570:35467/) * /imufilter (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...
Asked by sageedwards on 2021-11-08 10:59:18 UTC
Answers
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.
Asked by sageedwards on 2021-11-16 10:29:46 UTC
Comments
Interesting. Thank you for sharing. Should be added to the manual
Asked by osilva on 2021-11-16 10:40:10 UTC
among many other things...
Asked by sageedwards on 2021-11-16 14:52:56 UTC
Comments
Can you pls run and show the output:
Asked by osilva on 2021-11-08 12:55:20 UTC
Also please check this threads as it may give you some help: https://github.com/jackal/jackal_robot/issues/29
https://github.com/ccny-ros-pkg/imu_tools/issues/134
Asked by osilva on 2021-11-08 12:56:47 UTC
@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.Asked by Mike Scheutzow on 2021-11-08 13:26:28 UTC
@osilva The outputs of these commands are above, sorry about the delayed response.
Asked by sageedwards on 2021-11-09 14:06:45 UTC
@Mike Scheutzow I did run it as an adminstrator, in the ssh terminal. The robot spins and seems to do its thing
Asked by sageedwards on 2021-11-09 14:08:10 UTC
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/220799/not-seeing-topic-data-using-microstrain_3dm_gx3_45-with-a-3dm-gx3-35/
Asked by osilva on 2021-11-09 14:47:16 UTC
Create a new file
/opt/ros/melodic/etc/jackal_base/mag_config.yaml
with this content:and reboot the robot. Are there non-zero values on
/imu/mag
?Asked by Mike Scheutzow on 2021-11-09 16:06:30 UTC
@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.
Asked by sageedwards on 2021-11-09 16:35:25 UTC
check in the IMU itself - either a serial # or a part #, it's easier to find information on troubleshooting if we know the specific hardware. @Mike Scheutzow's is right on, please give it a try as well.
Asked by osilva on 2021-11-09 16:48:04 UTC