Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/timesync #2

Merged
merged 48 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3df3081
First somewhat working version. Refactored out timesync into header-o…
michaelpantic Sep 21, 2018
2a0d0a0
Minor comments / fixes
michaelpantic Sep 21, 2018
716118f
Removed some warning comments used for debugging
michaelpantic Sep 21, 2018
8e0fbc7
Ugly hacks to fix race conditions on startup
michaelpantic Sep 27, 2018
8e816f0
Enum instead of multiple bools for internal state
michaelpantic Sep 27, 2018
88f527a
Bugfixes and hacks to make it work properly
michaelpantic Oct 1, 2018
988004b
Timestamp offset
michaelpantic Oct 2, 2018
488d8b1
CleanuP
michaelpantic Oct 2, 2018
2d2226e
Fixed some race-conditions with caching of images
michaelpantic Oct 8, 2018
f02f6bb
Rewrote caching code
michaelpantic Oct 11, 2018
310b51b
Loon hacks
Oct 11, 2018
fb0a249
Revert "Loon hacks"
Oct 11, 2018
b9963d3
More debug output.
michaelpantic Oct 11, 2018
5fb9fbe
Merge branch 'feature/timesync' of github.com:ethz-asl/realsense into…
Oct 11, 2018
3995427
bugfixes
michaelpantic Oct 11, 2018
e8ade22
Merge branch 'feature/timesync' of github.com:ethz-asl/realsense into…
Oct 11, 2018
f95937a
Launchfile parameters for realsense-rovio
michaelpantic Oct 16, 2018
c0538c0
Merge newest branch
michaelpantic Oct 17, 2018
f46c501
Wait for service on startup, use steadily increasing seq nr
Oct 17, 2018
9242f60
Merge branch 'feature/timesync' of github.com:ethz-asl/realsense into…
Oct 17, 2018
9149c1f
Added mechanism for keeping track of trigger sequence without having …
michaelpantic Oct 17, 2018
a705d11
Dynamic Reconfigure fixes with new version
Oct 17, 2018
3d5b9b5
Dynamic reconfigure fix cleanup
michaelpantic Oct 17, 2018
2097620
Slight reformating to be more consistent w.r.t. intel code
michaelpantic Oct 17, 2018
0f65656
Cleanup of mavros_timestamp
michaelpantic Oct 17, 2018
ada78e2
Further cleanup of mavros_timestamp, added framerate param
michaelpantic Oct 17, 2018
5fcc823
Added timout in service waiter
michaelpantic Oct 17, 2018
f023429
Changes topic names to relative topics
michaelpantic Oct 17, 2018
caec657
Added remap for topic, changed some INFO outputs to DEBUG
michaelpantic Oct 17, 2018
ec62559
Multiple synchronized channels and bugfixes for it
Oct 19, 2018
f7f7a0a
Cleanup and warning about cache size
michaelpantic Oct 19, 2018
ab19f41
Gitignore stuff
michaelpantic Oct 19, 2018
7fe3760
Warnings, wrong casts etc
michaelpantic Oct 19, 2018
681b2da
Merge branch 'development' into feature/timesync
michaelpantic Oct 19, 2018
f6574de
Set frame-based logs to debug
michaelpantic Oct 19, 2018
765155e
Changes for higher resolution, bugfixes
michaelpantic Oct 22, 2018
79e3c5d
Changes for higher resolution + trigger time approximation for non sy…
michaelpantic Oct 22, 2018
46f9249
build fixes
michaelpantic Oct 22, 2018
83d27d9
Fixes
michaelpantic Oct 25, 2018
ff0f09b
Static timeshift correction
michaelpantic Oct 25, 2018
4ef0d13
Added timeshift as parameter (resolution etc dependent)
michaelpantic Oct 25, 2018
b97e3c7
increased logging
Oct 25, 2018
43142d3
Changed enum to enum class, addressed comments, autoformater
michaelpantic Oct 30, 2018
bef3eb2
Fixed merge conflict
michaelpantic Oct 30, 2018
5fa134b
Added enum for inter_cam_sync_mode
michaelpantic Oct 30, 2018
bebf67d
Merge branch 'development' into feature/timesync
michaelpantic Oct 30, 2018
5312121
Added dummy parameter because redirect can't be empty
michaelpantic Oct 30, 2018
d697a61
Added dummy parameter because redirect can't be empty
michaelpantic Oct 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions realsense2_camera/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CMakeLists.txt.user
cmake-build-debug/*
16 changes: 16 additions & 0 deletions realsense2_camera/include/base_realsense_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#pragma once

#include "../include/mavros_timestamp.h"
#include "../include/realsense_node_factory.h"
#include <dynamic_reconfigure/server.h>
#include <realsense2_camera/base_d400_paramsConfig.h>
Expand All @@ -28,6 +29,14 @@ namespace realsense2_camera
base_depth_count
};

// not using enum class here for consistence with realsense code.
enum inter_cam_sync_mode{
inter_cam_sync_default = 0,
inter_cam_sync_master = 1,
inter_cam_sync_slave = 2,
inter_cam_sync_none = -1
};

struct FrequencyDiagnostics
{
FrequencyDiagnostics(double expected_frequency, std::string name, std::string hardware_id) :
Expand Down Expand Up @@ -172,6 +181,13 @@ namespace realsense2_camera
std::map<stream_index_pair, sensor_msgs::CameraInfo> _camera_info;
bool _intialize_time_base;
double _camera_time_base;
inter_cam_sync_mode _inter_cam_sync_mode;
bool _force_mavros_triggering;
typedef struct{
sensor_msgs::ImagePtr img;
sensor_msgs::CameraInfo info;
}cache_type;
mavros_trigger::MavrosTrigger<stream_index_pair, cache_type> _trigger;
std::map<stream_index_pair, std::vector<rs2::stream_profile>> _enabled_profiles;

ros::Publisher _pointcloud_publisher;
Expand Down
2 changes: 2 additions & 0 deletions realsense2_camera/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace realsense2_camera
const bool ALIGN_DEPTH = false;
const bool POINTCLOUD = false;
const bool SYNC_FRAMES = false;
const bool FORCE_MAVROS_TRIGGERING = false;

const int DEPTH_WIDTH = 640;
const int DEPTH_HEIGHT = 480;
Expand Down Expand Up @@ -68,6 +69,7 @@ namespace realsense2_camera
const bool ENABLE_FISHEYE = true;
const bool ENABLE_IMU = true;

const std::string INTER_CAM_SYNC_MODE = "none";

const std::string DEFAULT_BASE_FRAME_ID = "camera_link";
const std::string DEFAULT_DEPTH_FRAME_ID = "camera_depth_frame";
Expand Down
Loading