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 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...
Can you pls run and show the output:
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...
@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.@osilva The outputs of these commands are above, sorry about the delayed response.
@Mike Scheutzow I did run it as an adminstrator, in the ssh terminal. The robot spins and seems to do its thing
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...
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
?@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.