Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
8b14718c
Commit
8b14718c
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Fix timestamp to grab frame
parent
f4dabfb1
No related branches found
No related tags found
No related merge requests found
Pipeline
#12290
passed
5 years ago
Stage: all
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/rgbd-sources/include/ftl/rgbd/source.hpp
+2
-1
2 additions, 1 deletion
components/rgbd-sources/include/ftl/rgbd/source.hpp
components/rgbd-sources/src/source.cpp
+3
-0
3 additions, 0 deletions
components/rgbd-sources/src/source.cpp
with
5 additions
and
1 deletion
components/rgbd-sources/include/ftl/rgbd/source.hpp
+
2
−
1
View file @
8b14718c
...
@@ -118,7 +118,7 @@ class Source : public ftl::Configurable {
...
@@ -118,7 +118,7 @@ class Source : public ftl::Configurable {
void
writeFrames
(
const
ftl
::
cuda
::
TextureObject
<
uchar4
>
&
rgb
,
const
ftl
::
cuda
::
TextureObject
<
uint
>
&
depth
,
cudaStream_t
stream
);
void
writeFrames
(
const
ftl
::
cuda
::
TextureObject
<
uchar4
>
&
rgb
,
const
ftl
::
cuda
::
TextureObject
<
uint
>
&
depth
,
cudaStream_t
stream
);
void
writeFrames
(
const
ftl
::
cuda
::
TextureObject
<
uchar4
>
&
rgb
,
const
ftl
::
cuda
::
TextureObject
<
float
>
&
depth
,
cudaStream_t
stream
);
void
writeFrames
(
const
ftl
::
cuda
::
TextureObject
<
uchar4
>
&
rgb
,
const
ftl
::
cuda
::
TextureObject
<
float
>
&
depth
,
cudaStream_t
stream
);
int64_t
timestamp
()
const
{
return
(
impl_
)
?
impl_
->
timestamp_
:
0
;
}
int64_t
timestamp
()
const
{
return
timestamp_
;
}
/**
/**
* Directly upload source RGB and Depth to GPU.
* Directly upload source RGB and Depth to GPU.
...
@@ -204,6 +204,7 @@ class Source : public ftl::Configurable {
...
@@ -204,6 +204,7 @@ class Source : public ftl::Configurable {
bool
bullet_
;
bool
bullet_
;
channel_t
channel_
;
channel_t
channel_
;
cudaStream_t
stream_
;
cudaStream_t
stream_
;
int64_t
timestamp_
;
detail
::
Source
*
_createImplementation
();
detail
::
Source
*
_createImplementation
();
detail
::
Source
*
_createFileImpl
(
const
ftl
::
URI
&
uri
);
detail
::
Source
*
_createFileImpl
(
const
ftl
::
URI
&
uri
);
...
...
This diff is collapsed.
Click to expand it.
components/rgbd-sources/src/source.cpp
+
3
−
0
View file @
8b14718c
...
@@ -30,6 +30,7 @@ Source::Source(ftl::config::json_t &cfg) : Configurable(cfg), pose_(Eigen::Matri
...
@@ -30,6 +30,7 @@ Source::Source(ftl::config::json_t &cfg) : Configurable(cfg), pose_(Eigen::Matri
impl_
=
nullptr
;
impl_
=
nullptr
;
params_
=
{
0
};
params_
=
{
0
};
stream_
=
0
;
stream_
=
0
;
timestamp_
=
0
;
reset
();
reset
();
on
(
"uri"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
on
(
"uri"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
...
@@ -42,6 +43,7 @@ Source::Source(ftl::config::json_t &cfg, ftl::net::Universe *net) : Configurable
...
@@ -42,6 +43,7 @@ Source::Source(ftl::config::json_t &cfg, ftl::net::Universe *net) : Configurable
impl_
=
nullptr
;
impl_
=
nullptr
;
params_
=
{
0
};
params_
=
{
0
};
stream_
=
0
;
stream_
=
0
;
timestamp_
=
0
;
reset
();
reset
();
on
(
"uri"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
on
(
"uri"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
...
@@ -228,6 +230,7 @@ bool Source::grab() {
...
@@ -228,6 +230,7 @@ bool Source::grab() {
stream_
=
0
;
stream_
=
0
;
return
true
;
return
true
;
}
else
if
(
impl_
&&
impl_
->
grab
(
-
1
,
-
1
))
{
}
else
if
(
impl_
&&
impl_
->
grab
(
-
1
,
-
1
))
{
timestamp_
=
impl_
->
timestamp_
;
impl_
->
rgb_
.
copyTo
(
rgb_
);
impl_
->
rgb_
.
copyTo
(
rgb_
);
impl_
->
depth_
.
copyTo
(
depth_
);
impl_
->
depth_
.
copyTo
(
depth_
);
return
true
;
return
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment