├── rviz.png
├── kf_gins_ros
├── launch
│ └── gins_rviz.launch
├── gins
│ ├── INSMechan.h
│ ├── basictype.h
│ ├── visualization.h
│ ├── parameters.h
│ ├── gins_engine.h
│ ├── parameters.cpp
│ ├── rotation.h
│ ├── visualization.cpp
│ ├── INSMechan.cpp
│ ├── earth.h
│ └── gins_engine.cpp
├── CMakeLists.txt
├── config
│ ├── gins.yaml
│ └── gins_rviz_config.rviz
├── package.xml
└── gins.cpp
├── data2bag
└── src
│ ├── CMakeLists.txt
│ ├── package.xml
│ └── data2bag.cpp
└── README.md
/rviz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/slender1031/kf-gins-ros/HEAD/rviz.png
--------------------------------------------------------------------------------
/kf_gins_ros/launch/gins_rviz.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/kf_gins_ros/gins/INSMechan.h:
--------------------------------------------------------------------------------
1 | #ifndef INSMECHAN_H_
2 | #define INSMECHAN_H_
3 |
4 | #include "basictype.h"
5 | #include "rotation.h"
6 |
7 | class INSMechan
8 | {
9 | public:
10 |
11 | static void insMechan(IMU &imupre, IMU &imucur, PVA &pvapre, PVA &pvacur);
12 |
13 | static void VelocityUpdate(IMU &imupre, IMU &imucur, PVA &pvapre, PVA &pvacur);
14 | static void PositionUpdate(IMU &imupre, IMU &imucur, PVA &pvapre, PVA &pvacur);
15 | static void AttitudeUpdate(IMU &imupre, IMU &imucur, PVA &pvapre, PVA &pvacur);
16 |
17 | };
18 |
19 |
20 |
21 |
22 | #endif // !INSMECHAN_H_
23 |
--------------------------------------------------------------------------------
/kf_gins_ros/gins/basictype.h:
--------------------------------------------------------------------------------
1 | #ifndef BASICTYPE_H_
2 | #define BASICTYPE_H_
3 |
4 |
5 | #include
6 |
7 | using Eigen::Matrix3d;
8 | using Eigen::Quaterniond;
9 | using Eigen::Vector3d;
10 |
11 |
12 | struct PVA
13 | {
14 | double time;
15 | Vector3d blh;
16 | Vector3d vel;
17 | Quaterniond qnb;
18 | };
19 |
20 | struct GNSS {
21 | double time;
22 | Vector3d blh;
23 | Matrix3d poscov;
24 |
25 | bool isvalid;
26 | } ;
27 |
28 | struct IMU
29 | {
30 | double time;
31 | double dt;
32 | Vector3d acc;
33 | Vector3d gyro;
34 | Vector3d dvel;
35 | Vector3d dtheta;
36 | } ;
37 |
38 |
39 | #endif //BASICTYPE_H_
40 |
41 |
--------------------------------------------------------------------------------
/data2bag/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
2 | project(data_convert)
3 |
4 | set(CMAKE_CXX_STANDARD 14)
5 |
6 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
7 |
8 |
9 | find_package(catkin REQUIRED COMPONENTS
10 | rosbag
11 | roscpp
12 | std_msgs
13 | cv_bridge
14 | image_transport
15 | sensor_msgs
16 | )
17 |
18 |
19 | catkin_package(
20 | )
21 |
22 |
23 | include_directories(
24 | ${catkin_INCLUDE_DIRS}
25 | )
26 |
27 |
28 | add_executable(data_convert_node data2bag.cpp)
29 | add_dependencies(data_convert_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
30 |
31 | target_link_libraries(data_convert_node
32 | ${catkin_LIBRARIES}
33 | )
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/kf_gins_ros/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
2 | project(gins)
3 |
4 | set(CMAKE_BUILD_TYPE "Release")
5 | set(CMAKE_CXX_STANDARD 14)
6 | #-DEIGEN_USE_MKL_ALL")
7 | set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
8 |
9 | find_package(Eigen3 REQUIRED)
10 | find_package(catkin REQUIRED COMPONENTS
11 | roscpp
12 | std_msgs
13 | cv_bridge
14 | image_transport
15 | sensor_msgs
16 | )
17 |
18 | find_package(OpenCV REQUIRED)
19 | find_package(Eigen3)
20 | include_directories(
21 | gins
22 | ${catkin_INCLUDE_DIRS}
23 | ${EIGEN3_INCLUDE_DIR}
24 | )
25 |
26 | catkin_package()
27 |
28 | add_library(gins_lib
29 | gins/gins_engine.cpp
30 | gins/INSMechan.cpp
31 | gins/parameters.cpp
32 | gins/visualization.cpp
33 | )
34 | target_link_libraries(gins_lib ${catkin_LIBRARIES} ${OpenCV_LIBS} )
35 |
36 |
37 | add_executable(gins_node gins.cpp)
38 | target_link_libraries(gins_node gins_lib)
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/kf_gins_ros/gins/visualization.h:
--------------------------------------------------------------------------------
1 | #ifndef VISUALIZATION_H_
2 | #define VISUALIZATION_H_
3 |
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | #include
20 |
21 | #include "gins_engine.h"
22 |
23 |
24 | extern ros::Publisher pub_ins_odometry;
25 | extern ros::Publisher pub_ins_path;
26 |
27 | extern ros::Publisher pub_gins_blh;
28 | extern ros::Publisher pub_gins_ned;
29 |
30 | void pubINSMech(const GINSEngine &gins_engine, const std_msgs::Header &header);
31 | void pubGINS(const GINSEngine &gins_engine, const std_msgs::Header &header);
32 |
33 |
34 | #endif
--------------------------------------------------------------------------------
/kf_gins_ros/gins/parameters.h:
--------------------------------------------------------------------------------
1 | #ifndef PARAMETERS_H_
2 | #define PARAMETERS_H_
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include