Verified that it can be compiled and run

This commit is contained in:
XinfangZhang 2023-07-29 16:01:07 +08:00
parent 42b4a22524
commit fd9246f53d
13 changed files with 443 additions and 23 deletions

View File

@ -0,0 +1 @@
# This file currently only serves to mark the location of a catkin workspace for tool integration

View File

@ -18,6 +18,52 @@
将/src/vins-fusion/utils/odom_visualization目录拷贝至本地进行编译然后在配置好多机ROS相关IP的情况下在本地启动`roslaunch odom_visualization vins_vis.launch` 将/src/vins-fusion/utils/odom_visualization目录拷贝至本地进行编译然后在配置好多机ROS相关IP的情况下在本地启动`roslaunch odom_visualization vins_vis.launch`
## 依赖
### Mavlink
此工程中包括mavros但对其中一个文件vision_pose_estimate.cpp做了修改编译此工程即可提供mavros相关功能。
直接源码编译安装mavros可能会出现与mavlink相关的依赖问题可以先直接二进制安装mavros让其自动解决相关依赖问题再编译此工程在编译完成后source此工程devel目录下的setup.bash通过环境变量的改变使得运行roslaunch mavros时启动的是此工程中的mavros而非二进制安装的原版。
二进制安装mavros参见https://blog.csdn.net/weixin_42301220/article/details/117845212
### Ceres
参见:
https://zhuanlan.zhihu.com/p/460685629
### Boost_python3
参见:
https://blog.csdn.net/zsf10220208/article/details/102571611#:~:text=%281%29%20%E5%8E%BBboost%E5%AE%98%E7%BD%91%20https%3A%2F%2Fwww.boost.org%2F%20%E4%B8%8B%E8%BD%BD%E8%BE%83%E6%96%B0%E7%89%88%E6%9C%AC%E7%9A%84boost%2C%E5%A6%82boost_1_71_0.zip.%20%282%29%20%E8%A7%A3%E5%8E%8B%3A%20unzip%20boost_1_71_0.zip,sudo.%2Fb2%20install%20%28d%29%20sudo%20ldconfig%20%284%29%20%E7%BC%96%E8%AF%91%E6%88%90%E5%8A%9F%E5%90%8E%E5%8F%AF%E4%BB%A5%E5%9C%A8%E9%BB%98%E8%AE%A4%E7%BC%96%E8%AF%91%E8%B7%AF%E5%BE%84%2Fusr%2Flocal%2Flib%E4%B8%8B%E6%89%BE%E5%88%B0%E7%9B%B8%E5%85%B3%E7%9A%84libboost%2A.so%2C%20boost%E5%9C%A8%2Fusr%2Flocal%2Finclude%2Fboost.
https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/
### OpenCV 3.4
https://github.com/opencv/opencv/tree/3.4
下载源码解压之后进入目录新建build目录在build目录下执行
```
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local/opencv34 -DWITH_LIBV4L=ON -DWITH_CUDA=OFF -DWITH_TBB=ON -DWITH_OPENMP=ON -DWITH_OPENGL=ON
make -j8
sudo make install
```
### RealsenseSDK
https://github.com/IntelRealSense/librealsense/releases
下载源码解压之后进入目录新建build目录在build目录下执行
```
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j8
sudo make install
```
## 编译 ## 编译
在blimp-autopilot下执行`catkin_make -DCMAKE_BUILD_TYPE=Release`即可执行编译 在blimp-autopilot下执行`catkin_make -DCMAKE_BUILD_TYPE=Release`即可执行编译

View File

@ -2,7 +2,7 @@
source ../devel/setup.bash source ../devel/setup.bash
roslaunch realsense2_camera rs_camera.launch & sleep 6; # roslaunch realsense2_camera rs_camera.launch & sleep 6;
rosrun vins vins_node ../src/vins-fusion/realflight_modules/VINS-Fusion/config/px4/stereo_imu_config_d435f.yaml & sleep 5; rosrun vins vins_node ../src/vins-fusion/realflight_modules/VINS-Fusion/config/px4/stereo_imu_config_d435f.yaml & sleep 5;
rosrun loop_fusion loop_fusion_node ../src/vins-fusion/realflight_modules/VINS-Fusion/config/px4/stereo_imu_config_d435f.yaml & sleep 1; rosrun loop_fusion loop_fusion_node ../src/vins-fusion/realflight_modules/VINS-Fusion/config/px4/stereo_imu_config_d435f.yaml & sleep 1;

View File

@ -56,20 +56,20 @@
#include <sensor_msgs/PointCloud2.h> #include <sensor_msgs/PointCloud2.h>
#include <pcl/PointIndices.h> #include <pcl/PointIndices.h>
//#include <pcl_msgs/PointIndices.h> #include <pcl_msgs/PointIndices.h>
#include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/PointIndices.h" // #include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/PointIndices.h"
#include <pcl/ModelCoefficients.h> #include <pcl/ModelCoefficients.h>
//#include <pcl_msgs/ModelCoefficients.h> #include <pcl_msgs/ModelCoefficients.h>
#include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/ModelCoefficients.h" // #include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/ModelCoefficients.h"
#include <pcl/Vertices.h> #include <pcl/Vertices.h>
//#include <pcl_msgs/Vertices.h> #include <pcl_msgs/Vertices.h>
#include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/Vertices.h" // #include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/Vertices.h"
#include <pcl/PolygonMesh.h> #include <pcl/PolygonMesh.h>
//#include <pcl_msgs/PolygonMesh.h> #include <pcl_msgs/PolygonMesh.h>
#include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/PolygonMesh.h" // #include "/root/catkin_ws/ego-planner/devel/include/pcl_msgs/PolygonMesh.h"
#include <pcl/io/pcd_io.h> #include <pcl/io/pcd_io.h>

View File

@ -16,8 +16,8 @@
#include <pcl/point_cloud.h> #include <pcl/point_cloud.h>
#include <pcl/point_types.h> #include <pcl/point_types.h>
//#include <pcl_conversions/pcl_conversions.h> #include <pcl_conversions/pcl_conversions.h>
#include "/root/catkin_ws/ego-planner/src/pcl_conversions/include/pcl_conversions/pcl_conversions.h" // #include "/root/catkin_ws/ego-planner/src/pcl_conversions/include/pcl_conversions/pcl_conversions.h"
#include <pcl/io/pcd_io.h> #include <pcl/io/pcd_io.h>
#include <message_filters/subscriber.h> #include <message_filters/subscriber.h>

View File

@ -6,8 +6,8 @@
#include <ros/ros.h> #include <ros/ros.h>
#include <pcl/point_cloud.h> #include <pcl/point_cloud.h>
#include <pcl/point_types.h> #include <pcl/point_types.h>
//#include <pcl_conversions/pcl_conversions.h> #include <pcl_conversions/pcl_conversions.h>
#include "/root/catkin_ws/ego-planner/src/pcl_conversions/include/pcl_conversions/pcl_conversions.h" // #include "/root/catkin_ws/ego-planner/src/pcl_conversions/include/pcl_conversions/pcl_conversions.h"
#include <global_planner/global_map.h> #include <global_planner/global_map.h>
#include <global_planner/raycast.h> #include <global_planner/raycast.h>
#include <visualization_msgs/Marker.h> #include <visualization_msgs/Marker.h>

View File

@ -15,8 +15,8 @@
#include <pcl/point_cloud.h> #include <pcl/point_cloud.h>
#include <pcl/point_types.h> #include <pcl/point_types.h>
//#include <pcl_conversions/pcl_conversions.h> #include <pcl_conversions/pcl_conversions.h>
#include "/root/catkin_ws/ego-planner/src/pcl_conversions/include/pcl_conversions/pcl_conversions.h" // #include "/root/catkin_ws/ego-planner/src/pcl_conversions/include/pcl_conversions/pcl_conversions.h"
#include <message_filters/subscriber.h> #include <message_filters/subscriber.h>
#include <message_filters/sync_policies/approximate_time.h> #include <message_filters/sync_policies/approximate_time.h>

View File

@ -26,7 +26,7 @@ find_package(Ceres REQUIRED)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(Eigen3) find_package(Eigen3)
include_directories(${catkin_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} /root/blimp-autopilot-master/src/realflight_modules/VINS-Fusion-gpu/vins_estimator/src/estimator) include_directories(${catkin_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR})
catkin_package() catkin_package()

View File

@ -3,13 +3,16 @@ project(cv_bridge)
find_package(catkin REQUIRED COMPONENTS rosconsole sensor_msgs) find_package(catkin REQUIRED COMPONENTS rosconsole sensor_msgs)
if(NOT ANDROID) if(NOT ANDROID)
find_package(PythonLibs) find_package(PythonLibs)
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) find_package(Boost REQUIRED python)
find_package(Boost REQUIRED python) # if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3)
else() # find_package(Boost REQUIRED python)
find_package(Boost REQUIRED python3) # else()
endif() # find_package(Boost REQUIRED python3)
# endif()
else() else()
find_package(Boost REQUIRED) find_package(Boost REQUIRED)
endif() endif()

View File

@ -0,0 +1,369 @@
Panels:
- Class: rviz/Displays
Help Height: 0
Name: Displays
Property Tree Widget:
Expanded:
- /map inflate1
- /Planning1/drone_path1
- /Odometry1/Shape1
- /drone1
Splitter Ratio: 0.43611112236976624
Tree Height: 1606
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Name: Time
SyncMode: 0
SyncSource: map inflate
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 1
Class: rviz/Axes
Enabled: true
Length: 1
Name: Axes
Radius: 0.05000000074505806
Reference Frame: <Fixed Frame>
Show Trail: false
Value: true
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 1000
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 2.875
Min Value: 0.11500000208616257
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 29; 108; 212
Color Transformer: AxisColor
Decay Time: 3
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: map inflate
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.23000000417232513
Style: Boxes
Topic: /drone_0_ego_planner_node/grid_map/occupancy_inflate
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Class: rviz/Group
Displays:
- Class: rviz/Marker
Enabled: true
Marker Topic: /drone_0_ego_planner_node/goal_point
Name: goal_point
Namespaces:
{}
Queue Size: 100
Value: true
- Class: rviz/Marker
Enabled: true
Marker Topic: /drone_0_ego_planner_node/global_list
Name: global_path
Namespaces:
"": true
Queue Size: 100
Value: true
- Class: rviz/Marker
Enabled: true
Marker Topic: /drone_0_ego_planner_node/optimal_list
Name: optimal_traj
Namespaces:
"": true
Queue Size: 100
Value: true
- Class: rviz/Marker
Enabled: false
Marker Topic: /drone_0_ego_planner_node/failed_list
Name: FailedList
Namespaces:
{}
Queue Size: 100
Value: false
- Class: rviz/Marker
Enabled: false
Marker Topic: /ego_planner_node/a_star_list
Name: AStar
Namespaces:
{}
Queue Size: 100
Value: false
- Class: rviz/Marker
Enabled: true
Marker Topic: /drone_0_ego_planner_node/init_list
Name: InitTraj
Namespaces:
"": true
Queue Size: 100
Value: true
- Alpha: 1
Buffer Length: 1
Class: rviz/Path
Color: 29; 108; 212
Enabled: false
Head Diameter: 0.30000001192092896
Head Length: 0.20000000298023224
Length: 0.30000001192092896
Line Style: Billboards
Line Width: 0.019999999552965164
Name: drone_path
Offset:
X: 0
Y: 0
Z: 0
Pose Color: 255; 85; 255
Pose Style: None
Queue Size: 10
Radius: 0.029999999329447746
Shaft Diameter: 0.10000000149011612
Shaft Length: 0.10000000149011612
Topic: /vins_estimator/path
Unreliable: false
Value: false
Enabled: true
Name: Planning
- Angle Tolerance: 0.10000000149011612
Class: rviz/Odometry
Covariance:
Orientation:
Alpha: 0.5
Color: 255; 255; 127
Color Style: Unique
Frame: Local
Offset: 1
Scale: 1
Value: true
Position:
Alpha: 0.30000001192092896
Color: 204; 51; 204
Scale: 1
Value: true
Value: true
Enabled: false
Keep: 1
Name: Odometry
Position Tolerance: 0.10000000149011612
Queue Size: 10
Shape:
Alpha: 1
Axes Length: 0.5
Axes Radius: 0.10000000149011612
Color: 255; 25; 0
Head Length: 0.30000001192092896
Head Radius: 0.10000000149011612
Shaft Length: 1
Shaft Radius: 0.05000000074505806
Value: Axes
Topic: /vins_estimator/odometry
Unreliable: false
Value: false
- Class: rviz/Marker
Enabled: true
Marker Topic: /odom_visualization/robot
Name: drone
Namespaces:
mesh: true
Queue Size: 100
Value: true
- Class: rviz/Marker
Enabled: true
Marker Topic: /drone_0_traj_server/yaw_direction
Name: des_yaw
Namespaces:
"": true
Queue Size: 1
Value: true
- Class: rviz/Marker
Enabled: false
Marker Topic: /visualization/applied_trajectory
Name: land_traj
Namespaces:
{}
Queue Size: 100
Value: false
- Alpha: 1
Buffer Length: 1
Class: rviz/Path
Color: 25; 255; 0
Enabled: false
Head Diameter: 0.30000001192092896
Head Length: 0.20000000298023224
Length: 0.30000001192092896
Line Style: Lines
Line Width: 0.029999999329447746
Name: Path
Offset:
X: 0
Y: 0
Z: 0
Pose Color: 255; 85; 255
Pose Style: None
Queue Size: 10
Radius: 0.029999999329447746
Shaft Diameter: 0.10000000149011612
Shaft Length: 0.10000000149011612
Topic: /mavros/setpoint_raw/local
Unreliable: false
Value: false
Enabled: true
Global Options:
Background Color: 255; 255; 255
Default Light: true
Fixed Frame: world
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
- Class: rviz_plugins/Goal3DTool
Topic: goal
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 6.624379634857178
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: 1.7512515783309937
Y: 1.7239826917648315
Z: 1.7014034986495972
Focal Shape Fixed Size: false
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.5147976875305176
Target Frame: my_view
Yaw: 2.367333173751831
Saved:
- Class: rviz/FPS
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Invert Z Axis: false
Name: FPS
Near Clip Distance: 0.009999999776482582
Pitch: 0.4000000059604645
Position:
X: -11
Y: 0
Z: 8
Roll: 0
Target Frame: my_view
Yaw: 0
- Class: rviz/FPS
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Invert Z Axis: false
Name: FPS
Near Clip Distance: 0.009999999776482582
Pitch: 0.5
Position:
X: -10
Y: 0
Z: 10
Roll: 0
Target Frame: my_view
Yaw: 0
- Class: rviz/FPS
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Invert Z Axis: false
Name: FPS
Near Clip Distance: 0.009999999776482582
Pitch: 0.6000000238418579
Position:
X: -10
Y: 0
Z: 10
Roll: 0
Target Frame: my_view
Yaw: 0
Window Geometry:
Displays:
collapsed: false
Height: 1872
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd00000004000000000000032f000006b4fc0200000029fb0000001200530065006c0065006300740069006f006e00000001e10000009b000000b000fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000b0fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000006e000006b40000018200fffffffb0000000a0049006d00610067006500000003e9000001900000000000000000fb0000000a005600690065007700730000000283000000b00000013200fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006100000001d1000000b50000000000000000fb0000000a006400650070007400680000000265000000c00000000000000000fb0000000a0049006d0061006700650000000501000002210000000000000000fb0000000a0049006d006100670065000000029e000001320000000000000000fb0000000a0064006500700074006800000004a2000000ac0000000000000000fb0000000a006400650070007400680100000178000001230000000000000000fb0000000a0064006500700074006800000004b9000000950000000000000000fb0000000a006400650070007400680000000481000000cd0000000000000000fb0000000a006400650070007400680000000429000001250000000000000000fb0000000a0064006500700074006800000003b7000000af0000000000000000fb0000000a0064006500700074006800000003d5000000b50000000000000000fb0000000a006400650070007400680000000444000001260000000000000000fb0000000a00640065007000740068000000041f0000014b0000000000000000fb0000000a0064006500700074006800000001b8000000160000000000000000fb0000000a0064006500700074006800000001c1000000160000000000000000fb0000000a0064006500700074006800000004b1000000550000000000000000fb0000000a006400650070007400680000000505000000650000000000000000fb0000000a006400650070007400680000000502000000680000000000000000fb0000000a0064006500700074006800000004f9000000710000000000000000fb0000000a0064006500700074006800000003000000017f0000000000000000fb0000000a0064006500700074006800000004de0000008c0000000000000000fb0000000a0064006500700074006800000004cc0000009e0000000000000000fb0000000a00640065007000740068000000048a000000c40000000000000000fb0000000a0064006500700074006800000004aa000000c00000000000000000fb0000000a006400650070007400680000000498000000d20000000000000000fb0000000a0049006d00610067006500000003fa000001540000000000000000fb0000000a0049006d00610067006501000002e1000002890000000000000000fb0000000a0049006d0061006700650100000278000002e60000000000000000fb0000000a0049006d006100670065010000014e0000021d0000000000000000fb0000000a0049006d0061006700650100000372000001be0000000000000000fb0000000a0049006d006100670065010000026e000002c20000000000000000000000010000010f00000385fc0200000002fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006100000003bfc0100000002fb0000000800540069006d00650000000000000006100000077d00fffffffb0000000800540069006d00650100000000000004500000000000000000000007ed000006b400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 2856
X: 144
Y: 54

View File

@ -1,7 +1,6 @@
<launch> <launch>
<node pkg="odom_visualization" name="odom_visualization" type="odom_visualization" output="screen"> <node pkg="odom_visualization" name="odom_visualization" type="odom_visualization" output="screen">
<!-- <remap from="~odom" to="/fusion_odom"/> --> <remap from="~odom" to="/loop_fusion/odometry_rect" />
<remap from="~odom" to="/vins_estimator/imu_propagate" />
<param name="color/a" value="1.0"/> <param name="color/a" value="1.0"/>
<param name="color/r" value="0.0"/> <param name="color/r" value="0.0"/>
@ -11,4 +10,6 @@
<param name="robot_scale" value="1.0"/> <param name="robot_scale" value="1.0"/>
</node> </node>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find odom_visualization)/launch/default.rviz" required="true" />
</launch> </launch>