-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing topic sync lagging and delay issues, more examples (depthai, z…
…ed) (#1206) * Fixed odometry latency * Fixed node ID=0 issues as msgs may not have seq. (#1202) (cherry picked from commit 097cab0) * Odom: removed long processing from ros callbacks (decreasing delay, also making delay independent of the message filters topic_queue_size and sync_queue_size parameters) * Changed a log from info->debug * Changed a log from info->debug * Updated default topic and sync queue_size inside nodes. Exposing topic and sync queue size params in warning when cannot synchronize. Added zed and depthai examples. Odom: Fixed imu callback group, added multi-threaded executors for all odometry nodes. * fixed merge * Include everything needed in example launch files for simple launch. Small fixes. --------- Co-authored-by: Borong Yuan <yuanborong@hotmail.com>
- Loading branch information
1 parent
268609b
commit c956e37
Showing
27 changed files
with
464 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Requirements: | ||
# A OAK-D camera | ||
# Install depthai-ros package (https://github.com/luxonis/depthai-ros) | ||
# Example: | ||
# $ ros2 launch rtabmap_examples depthai.launch.py camera_model:=OAK-D | ||
|
||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
|
||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
|
||
|
||
def generate_launch_description(): | ||
parameters=[{'frame_id':'oak-d-base-frame', | ||
'subscribe_rgbd':True, | ||
'subscribe_odom_info':True, | ||
'approx_sync':False, | ||
'wait_imu_to_init':True}] | ||
|
||
remappings=[('imu', '/imu/data')] | ||
|
||
return LaunchDescription([ | ||
|
||
# Launch camera driver | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource([os.path.join( | ||
get_package_share_directory('depthai_examples'), 'launch'), | ||
'/stereo_inertial_node.launch.py']), | ||
launch_arguments={'depth_aligned': 'false', | ||
'enableRviz': 'false', | ||
'monoResolution': '400p'}.items(), | ||
), | ||
|
||
# Sync right/depth/camera_info together | ||
Node( | ||
package='rtabmap_sync', executable='rgbd_sync', output='screen', | ||
parameters=parameters, | ||
remappings=[('rgb/image', '/right/image_rect'), | ||
('rgb/camera_info', '/right/camera_info'), | ||
('depth/image', '/stereo/depth')]), | ||
|
||
# Compute quaternion of the IMU | ||
Node( | ||
package='imu_filter_madgwick', executable='imu_filter_madgwick_node', output='screen', | ||
parameters=[{'use_mag': False, | ||
'world_frame':'enu', | ||
'publish_tf':False}], | ||
remappings=[('imu/data_raw', '/imu')]), | ||
|
||
# Visual odometry | ||
Node( | ||
package='rtabmap_odom', executable='rgbd_odometry', output='screen', | ||
parameters=parameters, | ||
remappings=remappings), | ||
|
||
# VSLAM | ||
Node( | ||
package='rtabmap_slam', executable='rtabmap', output='screen', | ||
parameters=parameters, | ||
remappings=remappings, | ||
arguments=['-d']), | ||
|
||
# Visualization | ||
Node( | ||
package='rtabmap_viz', executable='rtabmap_viz', output='screen', | ||
parameters=parameters, | ||
remappings=remappings) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.