Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CrowdBotUnity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
CrowdBot
CrowdBotUnity
Merge requests
!9
#6
Clock subsriber and ToolTime upgraded for ROS usage
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#6
Clock subsriber and ToolTime upgraded for ROS usage
6-time-api
into
master
Overview
0
Commits
1
Pipelines
0
Changes
6
Merged
Fabien Grzeskowiak
requested to merge
6-time-api
into
master
6 years ago
Overview
0
Commits
1
Pipelines
0
Changes
6
Expand
Closes
#6 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
64f72b2b
1 commit,
6 years ago
6 files
+
142
−
95
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
Assets/AddOns/RosSharp/Scripts/RosBridgeClient/RosCommuncation/ClockSubscriber.cs
0 → 100644
+
34
−
0
Options
using
UnityEngine
;
namespace
RosSharp.RosBridgeClient
{
public
class
ClockSubscriber
:
Subscriber
<
Messages
.
rosgraph_msgs
.
Clock
>
{
private
float
deltaTime
=
0
;
private
float
lastTime
=
0
;
private
uint
secs
=
0
;
private
uint
nsecs
=
0
;
public
float
DeltaTime
{
get
{
float
dt
=
deltaTime
;
deltaTime
=
0
;
return
dt
;
}}
protected
override
void
Start
()
{
base
.
Start
();
}
protected
override
void
ReceiveMessage
(
Messages
.
rosgraph_msgs
.
Clock
message
)
{
secs
=
message
.
clock
.
secs
;
nsecs
=
message
.
clock
.
nsecs
;
float
currentTime
=
(
float
)(
secs
)
+
(
float
)(
nsecs
)/
1e9f
;
deltaTime
=
currentTime
-
lastTime
;
lastTime
=
currentTime
;
}
}
}
Loading