BiGbaii / Gnss-IMU_Fusion

ros2 version
0 stars 1 forks source link

I don't understand your program's running logic, I think there's a problem with your program #1

Open Hugo-Xu-maker opened 5 months ago

Hugo-Xu-maker commented 5 months ago

I have written relevant IMU topics according to the format of the IMU topic information you subscribed to (there are two in total, one is the timestamp, angular velocity, and linear acceleration of the IMU, and the other is the yaw angle obtained from the four sources measured by the IMU); Simultaneously using GPS measurements of latitude, longitude, and altitude, convert them into the ECE coordinate system, and obtain their position, velocity, and timestamp in the ECE coordinate system, and publish them as topics; Then use your code for message subscription reception, but your code does not output results.I can't understand the reason behind it, could you please write your Readme more clearly

BiGbaii commented 5 months ago

the program works well in us test data,it should be fine. 2 topic are Already enough. one is IMU topic ,one is GPS topic.NOTED that you are trans GPS's LLA to ECEF coordinate,is unnecessary. The code just receive LLA and turn it into ENU coordinate. And we just use the angular velocity, and linear acceleration which means 6dom IMU is enough. you can check the code for more detail. <sensor_msgs::msg::NavSatFix <sensor_msgs::msg::Imu
these are 2 topics the program Subscribed.

BiGbaii commented 5 months ago

I have written relevant IMU topics according to the format of the IMU topic information you subscribed to (there are two in total, one is the timestamp, angular velocity, and linear acceleration of the IMU, and the other is the yaw angle obtained from the four sources measured by the IMU); Simultaneously using GPS measurements of latitude, longitude, and altitude, convert them into the ECE coordinate system, and obtain their position, velocity, and timestamp in the ECE coordinate system, and publish them as topics; Then use your code for message subscription reception, but your code does not output results.I can't understand the reason behind it, could you please write your Readme more clearly

the program works well in us test data,it should be fine. 2 topic are Already enough. one is IMU topic ,one is GPS topic.NOTED that you are trans GPS's LLA to ECEF coordinate,is unnecessary. The code just receive LLA and turn it into ENU coordinate. And we just use the angular velocity, and linear acceleration which means 6dom IMU is enough. you can check the code for more detail. <sensor_msgs::msg::NavSatFix <sensor_msgs::msg::Imu these are 2 topics the program Subscribed.

EricDaJiang commented 5 months ago

What version of glog are you using? I installed a version of glog that seems to be incompatible, and I encountered an error during compilation:
| google::LogSeverity In file included from /usr/local/include/glog/logging.h:77, from /home/leojt/usv_integrat/src/Gnss-IMU_Fusion/src/gins.cpp:2: /usr/local/include/glog/log_severity.h:62:6: note: ‘google::LogSeverity’ declared here 62 | enum LogSeverity { | ^~~ In file included from /home/leojt/usv_integrat/src/Gnss-IMU_Fusion/src/gins.cpp:2: /usr/local/include/glog/logging.h:1524:34: error: expected primary-expression before ‘const’ 1524 | const char addresses); | ^~~~~ /usr/local/include/glog/logging.h:1528:1: error: two or more data types in declaration of ‘SendEmail’ 1528 | GLOG_EXPORT bool SendEmail(const char dest, const char subject, | ^~~ /usr/local/include/glog/logging.h:1531:43: error: invalid declarator before ‘&’ token 1531 | GLOG_EXPORT const std::vector& GetLoggingDirectories(); | ^ /usr/local/include/glog/logging.h:1536:1: error: two or more data types in declaration of ‘ReprintFatalMessage’ 1536 | GLOG_EXPORT void ReprintFatalMessage(); | ^~~ /usr/local/include/glog/logging.h:1545:52: error: ‘uint64’ has not been declared 1545 | GLOG_EXPORT void TruncateLogFile(const char path, uint64 limit, uint64 keep); | ^~ /usr/local/include/glog/logging.h:1545:66: error: ‘uint64’ has not been declared 1545 | GLOG_EXPORT void TruncateLogFile(const char path, uint64 limit, uint64 keep); | ^~ /usr/local/include/glog/logging.h:1545:1: error: two or more data types in declaration of ‘TruncateLogFile’ 1545 | GLOG_EXPORT void TruncateLogFile(const char path, uint64 limit, uint64 keep); | ^~~ /usr/local/include/glog/logging.h:1550:1: error: two or more data types in declaration of ‘TruncateStdoutStderr’ 1550 | GLOG_EXPORT void TruncateStdoutStderr(); | ^~~ /usr/local/include/glog/logging.h:1554:1: error: two or more data types in declaration of ‘GetLogSeverityName’ 1554 | GLOG_EXPORT const char GetLogSeverityName(LogSeverity severity); | ^~~ /usr/local/include/glog/logging.h:1554:44: error: ‘LogSeverity’ was not declared in this scope; did you mean ‘google::LogSeverity’? 1554 | GLOG_EXPORT const char GetLogSeverityName(LogSeverity severity); | ^~~ | google::LogSeverity .

BiGbaii commented 5 months ago

What version of glog are you using? I installed a version of glog that seems to be incompatible, and I encountered an error during compilation: | google::LogSeverity In file included from /usr/local/include/glog/logging.h:77, from /home/leojt/usv_integrat/src/Gnss-IMU_Fusion/src/gins.cpp:2: /usr/local/include/glog/log_severity.h:62:6: note: ‘google::LogSeverity’ declared here 62 | enum LogSeverity { | ^~~ In file included from /home/leojt/usv_integrat/src/Gnss-IMU_Fusion/src/gins.cpp:2: /usr/local/include/glog/logging.h:1524:34: error: expected primary-expression before ‘const’ 1524 | const char addresses); | ^~~~~ /usr/local/include/glog/logging.h:1528:1: error: two or more data types in declaration of ‘SendEmail’ 1528 | GLOG_EXPORT bool SendEmail(const char dest, const char subject, | ^~~ /usr/local/include/glog/logging.h:1531:43: error: invalid declarator before ‘&’ token 1531 | GLOG_EXPORT const std::vectorstd::string& GetLoggingDirectories(); | ^ /usr/local/include/glog/logging.h:1536:1: error: two or more data types in declaration of ‘ReprintFatalMessage’ 1536 | GLOG_EXPORT void ReprintFatalMessage(); | ^~~ /usr/local/include/glog/logging.h:1545:52: error: ‘uint64’ has not been declared 1545 | GLOG_EXPORT void TruncateLogFile(const char path, uint64 limit, uint64 keep); | ^~ /usr/local/include/glog/logging.h:1545:66: error: ‘uint64’ has not been declared 1545 | GLOG_EXPORT void TruncateLogFile(const char path, uint64 limit, uint64 keep); | ^~ /usr/local/include/glog/logging.h:1545:1: error: two or more data types in declaration of ‘TruncateLogFile’ 1545 | GLOG_EXPORT void TruncateLogFile(const char path, uint64 limit, uint64 keep); | ^~~ /usr/local/include/glog/logging.h:1550:1: error: two or more data types in declaration of ‘TruncateStdoutStderr’ 1550 | GLOG_EXPORT void TruncateStdoutStderr(); | ^~~ /usr/local/include/glog/logging.h:1554:1: error: two or more data types in declaration of ‘GetLogSeverityName’ 1554 | GLOG_EXPORT const char GetLogSeverityName(LogSeverity severity); | ^~~ /usr/local/include/glog/logging.h:1554:44: error: ‘LogSeverity’ was not declared in this scope; did you mean ‘google::LogSeverity’? 1554 | GLOG_EXPORT const char GetLogSeverityName(LogSeverity severity); | ^~~ | google::LogSeverity .

my glog's version is glog-0.4.0, and I have not test it on the newest glog version. I think you may use the newest version. You can find it on the below URL: https://github.com/google/glog/releases if it still incompatible just delete the glog part in the code,it won't have any influence to the program. I just use it to check the program is working in the right way when Im coding.

Hugo-Xu-maker commented 4 months ago

Does your IMU_GPS fusion code have a corresponding ROS1 version? Can you tell me the address? I sincerely look forward to your answer!