Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7ae2741
Added Video subscribing tutorial
Myzhar Sep 7, 2018
ba2183a
Added Depth tutorial
Myzhar Sep 7, 2018
b3d7eb2
Create readme.md
Myzhar Sep 7, 2018
f3314c5
Create README.md
Myzhar Sep 7, 2018
e9bd256
Create README.md
Myzhar Sep 7, 2018
1d208d6
Simpliefied the code of the Video tutorial
Myzhar Sep 7, 2018
5fc981b
Merge branch 'tutorials_feat' of https://github.com/stereolabs/zed-ro…
Myzhar Sep 7, 2018
fbd9d56
Minor change
Myzhar Sep 7, 2018
12ee09c
Folder reorganization
Myzhar Sep 7, 2018
5c26c9b
Update README.md
Myzhar Sep 7, 2018
da2f17c
Update README.md
Myzhar Sep 7, 2018
f1b8246
Update README.md
Myzhar Sep 7, 2018
8f6aebb
Depth subscribing tutorial updated
Myzhar Sep 7, 2018
911f853
Merge branch 'tutorials_feat' of https://github.com/stereolabs/zed-ro…
Myzhar Sep 7, 2018
6c236cf
Added tutorial for positional tracking
Myzhar Sep 10, 2018
6fbe9ca
Updated the description of the RTABmap example
Myzhar Sep 10, 2018
e571a6f
zed_nodelet_example README documentation expanded
Myzhar Sep 10, 2018
3701b94
zed_nodelet_example documentation improved
Myzhar Sep 10, 2018
34f4b90
Update README.md
Myzhar Sep 10, 2018
358f8e5
Update README.md
Myzhar Sep 10, 2018
f31be14
Improved READMEs
Myzhar Sep 11, 2018
0138c83
Merge branch 'tutorials_feat' of https://github.com/stereolabs/zed-ro…
Myzhar Sep 11, 2018
726331f
Update README.md
Myzhar Sep 11, 2018
ecca114
Update README.md
Myzhar Sep 11, 2018
d009a33
Update README.md
Myzhar Sep 11, 2018
d998cf2
Update README.md
Myzhar Sep 11, 2018
fcf433e
Update README.md
Myzhar Sep 11, 2018
19ed184
Update README.md
Myzhar Sep 11, 2018
24779e9
Update README.md
Myzhar Sep 11, 2018
c3ad465
Update README.md
Myzhar Sep 11, 2018
f028f79
Update README.md
Myzhar Sep 11, 2018
c2c863f
Update README.md
Myzhar Sep 11, 2018
4ffb7f1
Update README.md
Myzhar Sep 11, 2018
606c453
Fixed display.launch
Myzhar Sep 11, 2018
b6bb43f
Fixed issue with SVO and timestamps
Myzhar Sep 11, 2018
85431d8
Resize README logo
Myzhar Sep 11, 2018
c2a9306
Changed README logos
Myzhar Sep 11, 2018
bc2f8ab
Added features from `devel` branch:
Myzhar Sep 12, 2018
add1ad9
Added missing "max_depth" param in launch files
Myzhar Sep 12, 2018
7a513b1
Added check on SDK version for Floor Alignment
Myzhar Sep 12, 2018
6e9a809
Better Rviz plugin organization
Myzhar Sep 12, 2018
c0b7510
Fixed init odometry with first valid pose when IMU is not available
Myzhar Sep 12, 2018
d228316
Debug info
Myzhar Sep 12, 2018
b3b47b7
Added covariance
Myzhar Sep 13, 2018
dcf9b27
Minor change
Myzhar Sep 13, 2018
c443709
Manually merged `no_opencv` modifications
Myzhar Sep 14, 2018
7a31aa7
Updated the version of the packages
Myzhar Sep 14, 2018
a6887e5
Updated email in package.xml
Myzhar Sep 14, 2018
e48fe04
Changed email adresses. ROS doesn't accept "support at stereolabs.com"
Myzhar Sep 14, 2018
735c3ae
Added `zer_ros` meta-package
Myzhar Sep 14, 2018
b9c321c
Added `zed_ros` meta-package
Myzhar Sep 14, 2018
831deeb
Merge branch 'tutorials_feat' of https://github.com/stereolabs/zed-ro…
Myzhar Sep 14, 2018
b21717c
Minor fixes
Myzhar Sep 14, 2018
0cbcb88
Param init_odom_with_imu renamed to init_odom_with_first_valid_pose
Myzhar Sep 17, 2018
7840293
Improved solution to issue #276
Myzhar Sep 19, 2018
d96d535
Fixes to odometry TF
Myzhar Sep 19, 2018
a27f567
Fix to path frames for odometry
Myzhar Sep 20, 2018
673d6c2
Added parameter to disable covariance as requested here: https://
Myzhar Sep 21, 2018
d8c5a07
Merge branch 'master' into tutorials_feat
Myzhar Sep 21, 2018
56bb273
Minor changes README
adujardin Sep 21, 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
Prev Previous commit
Next Next commit
Fixed issue with SVO and timestamps
  • Loading branch information
Myzhar committed Sep 11, 2018
commit b6bb43fb58c408eefab263e911e3df2b812ba6b1
1 change: 1 addition & 0 deletions zed_wrapper/src/nodelet/include/zed_wrapper_nodelet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ namespace zed_wrapper {
std::string svoFilepath;
double imuPubRate;
bool verbose;
bool mSvoMode = false;

// IMU time
ros::Time imuTime;
Expand Down
56 changes: 44 additions & 12 deletions zed_wrapper/src/nodelet/src/zed_wrapper_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ namespace zed_wrapper {
// Try to initialize the ZED
if (!svoFilepath.empty()) {
param.svo_input_filename = svoFilepath.c_str();

mSvoMode = true;
} else {
param.camera_fps = frameRate;
param.camera_resolution = static_cast<sl::RESOLUTION>(resolution);
Expand Down Expand Up @@ -1109,8 +1111,15 @@ namespace zed_wrapper {
return;
}

ros::Time t =
sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_IMAGE));
// ros::Time t =
// sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_IMAGE));

ros::Time t;
if (mSvoMode) {
t = ros::Time::now();
} else {
t = sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_IMAGE));
}

sl::IMUData imu_data;
zed.getIMUData(imu_data, sl::TIME_REFERENCE_CURRENT);
Expand Down Expand Up @@ -1244,9 +1253,17 @@ namespace zed_wrapper {
void ZEDWrapperNodelet::device_poll() {
ros::Rate loop_rate(frameRate);

ros::Time old_t =
sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
imuTime = old_t;
// ros::Time old_t =
// sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
// imuTime = old_t;

ros::Time t_old;
if (mSvoMode) {
t_old = ros::Time::now();
} else {
t_old = sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
}
ros::Time old_t = t_old;

sl::ERROR_CODE grab_status;
trackingActivated = false;
Expand Down Expand Up @@ -1328,8 +1345,12 @@ namespace zed_wrapper {
// depth information

// Timestamp
ros::Time t =
sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_IMAGE));
ros::Time t;
if (mSvoMode) {
t = ros::Time::now();
} else {
t = sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_IMAGE));
}

grabbing = true;
if (computeDepth) {
Expand Down Expand Up @@ -1360,7 +1381,7 @@ namespace zed_wrapper {

std::this_thread::sleep_for(std::chrono::milliseconds(2));

if ((t - old_t).toSec() > 5) {
if ((t - old_t).toSec() > 5 && !mSvoMode) {
zed.close();

NODELET_INFO("Re-opening the ZED");
Expand Down Expand Up @@ -1393,8 +1414,13 @@ namespace zed_wrapper {
}

// Time update
old_t =
sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
ros::Time t_old;
if (mSvoMode) {
t_old = ros::Time::now();
} else {
t_old = sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
}
old_t = t_old;

if (autoExposure) {
// getCameraSettings() can't check status of auto exposure
Expand Down Expand Up @@ -1675,8 +1701,14 @@ namespace zed_wrapper {

// Publish odometry tf only if enabled
if (publishTf) {
ros::Time t =
sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
ros::Time t;

if (mSvoMode) {
t = ros::Time::now();
} else {
t = sl_tools::slTime2Ros(zed.getTimestamp(sl::TIME_REFERENCE_CURRENT));
}

publishOdomFrame(baseToOdomTransform,
t); // publish the base Frame in odometry frame
publishPoseFrame(odomToMapTransform,
Expand Down