Open KaiSWang opened 6 years ago
Hello,
Among the messages, I see Razor_AHRS_ino.ino, which should not exist. Maybe try to delete all your previous attempts and download again the different project files to restart from a clean state, and ensure that the files that you are trying to compile are really the one you think...
thanks for your reply. It seems I put make a wrong copy accidentally. However, now I put the Arduino repo in sketchbook but the same messages comes out again. But it can compile successfully when I change using Windows instead of Linux (I am using TX2). Can I upload the Razor_AHRS.ino by windows system first and using ros to implement my project?
I already test it, but I got a Error messages when "roslaunch razor_imu_9dof razor-pub-and-display.launch":
[display_3D_visualization_node-3] process has died [pid 23705, exit code 1, cmd /home/nvidia/jetsonbot/src/razor_imu_9dof/nodes/display_3D_visualization.py __name:=display_3D_visualization_node __log:=/home/nvidia/.ros/log/159c941a-b2a8-11e8-ba0a-00044b8d3f6d/display_3D_visualization_node-3.log]. log file: /home/nvidia/.ros/log/159c941a-b2a8-11e8-ba0a-00044b8d3f6d/display_3D_visualization_node-3*.log
Yes, you can upload the firmware from Windows, and then use ROS. For your error with ROS, you will need to check more what the output/log files say before the error message... Among the typical problems : did you put the correct serial port in my_razor.yaml (could be e.g. /dev/ttyACM0, /dev/ttyACM1, etc. for the M0 on Linux)? It could be good also (if not already done) to check without using ROS that the Razor is working as expected, e.g. using the Serial Monitor of Arduino : https://github.com/Razor-AHRS/razor-9dof-ahrs/wiki/Tutorial#testing-the-tracker.
Thanks again. I found out the error message comes from python-visual's package / material.py, it's similar in this discussion: https://github.com/KristofRobot/razor_imu_9dof/issues/39
However, It worked fine when I visualize the base_imu_link by rviz. It probably means I can use it on my robot, even the visualization is not so good. I will update the information if it works.
I got these messages when I compile and I already put the library of MPU9250-DMP from https://github.com/lebarsfa/SparkFun_MPU-9250-DMP_Arduino_Library.git:
Razor_AHRS.ino: In function ‘void read_sensors()’: Razor_AHRS.ino:503:12: error: ‘loop_imu’ was not declared in this scope Razor_AHRS.ino: In function ‘void compensate_sensor_errors()’: Razor_AHRS.ino:543:78: error: ‘Matrix_Vector_Multiply’ was not declared in this scope Razor_AHRS.ino: In function ‘void reset_sensor_fusion()’: Razor_AHRS.ino:576:43: error: ‘Vector_Cross_Product’ was not declared in this scope Razor_AHRS.ino:584:19: error: ‘Compass_Heading’ was not declared in this scope Razor_AHRS.ino:588:52: error: ‘init_rotation_matrix’ was not declared in this scope Razor_AHRS.ino: In function ‘char readChar()’: Razor_AHRS.ino:223:18: error: ‘SERIAL_PORT_USBVIRTUAL’ was not declared in this scope Razor_AHRS.ino:627:10: note: in expansion of macro ‘LOG_PORT’ Razor_AHRS.ino:223:18: error: ‘SERIAL_PORT_USBVIRTUAL’ was not declared in this scope Razor_AHRS.ino:628:10: note: in expansion of macro ‘LOG_PORT’ Razor_AHRS.ino: In function ‘void setup()’: Razor_AHRS.ino:631:6: error: redefinition of ‘void setup()’ Razor_AHRS_ino.ino:8:6: note: ‘void setup()’ previously defined here Razor_AHRS.ino:223:18: error: ‘SERIAL_PORT_USBVIRTUAL’ was not declared in this scope Razor_AHRS.ino:634:3: note: in expansion of macro ‘LOG_PORT’ Razor_AHRS.ino:647:11: error: ‘initIMU’ was not declared in this scope Razor_AHRS.ino: In function ‘void loop()’: Razor_AHRS.ino:672:6: error: redefinition of ‘void loop()’ Razor_AHRS_ino.ino:14:6: note: ‘void loop()’ previously defined here Razor_AHRS.ino:223:18: error: ‘SERIAL_PORT_USBVIRTUAL’ was not declared in this scope Razor_AHRS.ino:678:7: note: in expansion of macro ‘LOG_PORT’ Razor_AHRS.ino:979:91: error: ‘output_calibration’ was not declared in this scope Razor_AHRS.ino:990:23: error: ‘Compass_Heading’ was not declared in this scope Razor_AHRS.ino:991:21: error: ‘Matrix_update’ was not declared in this scope Razor_AHRS.ino:992:17: error: ‘Normalize’ was not declared in this scope Razor_AHRS.ino:993:24: error: ‘Drift_correction’ was not declared in this scope Razor_AHRS.ino:994:20: error: ‘Euler_angles’ was not declared in this scope Razor_AHRS.ino:997:63: error: ‘output_angles’ was not declared in this scope Razor_AHRS.ino:1008:23: error: ‘Compass_Heading’ was not declared in this scope Razor_AHRS.ino:1009:21: error: ‘Matrix_update’ was not declared in this scope Razor_AHRS.ino:1010:17: error: ‘Normalize’ was not declared in this scope Razor_AHRS.ino:1011:24: error: ‘Drift_correction’ was not declared in this scope Razor_AHRS.ino:1012:20: error: ‘Euler_angles’ was not declared in this scope Razor_AHRS.ino:1015:85: error: ‘output_both_angles_and_sensors_text’ was not declared in this scope Razor_AHRS.ino:1019:64: error: ‘output_sensors’ was not declared in this scope
Appreciated for any suggestion, thanks.