-

Package Summary

Tags No category tags.
Version 2.9.2
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/orocos/rtt_ros_integration.git
VCS Type git
VCS Version toolchain-2.9
Last Updated 2022-07-09
Dev Status MAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides an RTT plugin to access different time measurements on a realtime host.

Additional Links

Maintainers

  • Orocos Developers

Authors

No additional authors.

RTT ROSClock

This package contains helpful functions for measuring time according to different sources on a realtime operating system.

When running Orocos components in a ROS network, it’s important to keep time synchronized between different machines. If you use the standard RTT::TimeService calls to query time, this might be tens of seconds different from the NTP-corrected time and any timestamped messages published to ROS will be dramatically delayed.

To avoid these problems while staying realtime-safe (and portable), you can use the rtt_rosclock::host_now() function to get a ROS time structure that uses the CLOCK_HOST_REALTIME realtime time source on a Xenomai system. On a gnu/linux system, this call will just return the result of the standard ros::Time::now() function.

Use host_now() for broadcasting ROS Header Stamps

The rtt_rosclock::host_now() function is the time source that should always be used with ROS header timestamps because it is the time that you want to use to broadcast ROS messages to other machines or processes. It is assumed that if the /clock topic is active, then any ROS messages broadcasted are based on that time source.

When compiled against Xenomai and not running in simulation mode, this function will return the NTP-synchronized clock time via the CLOCK_HOST_REALTIME clock source. Note that this is only supported under Xenomai 2.6 and above.

When not compiled against Xenomai and not running in simulation mode, it is a pass-through to ros::Time::now().

When running in simulation mode, this will always use the simulation clock, which is based off of the ROS /clock topic. It is a pass-through to rtt_rosclock::rtt_now().

RTT Services

Clock Service

The “rosclock” RTT service also provides a sub-service of the global “ros” service called “ros.clock” which provides the following operations:

  • ros::Time ros.clock.host_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the sim clock.
  • ros::Time ros.clock.host_wall_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the wall clock.
  • ros::Time ros.clock.rtt_now(void) Get a ROS time structure from the RTT clock or the sim clock.
  • ros::Time ros.clock.rtt_wall_now(void) Get a ROS time structure from the RTT wall clock.
  • RTT::Seconds ros.clock.host_offset_from_rtt(void) Get the differences from the RTT wall clock source to the NTP-adjusted realtime clock source.

C++ API

The calls are also available via the rtt_rosclock/rtt_rosclock.h header:

  • ros::Time rtt_rosclock::host_now(void)
  • ros::Time rtt_rosclock::host_wall_now(void)
  • ros::Time rtt_rosclock::rtt_now(void)
  • ros::Time rtt_rosclock::rtt_wall_now(void)
  • RTT::Seconds rtt_rosclock::host_offset_from_rtt(void)

Simulation Clock Activity

This package also provides an RTT SimClockActivity which will periodically execute a task subject to the progression of a simulated clock source. This clock source can either be the ROS /clock topic if it exists and the /use_sim_time parameter is set to true, or it can use a manual time update from some other in-process source.

The simulation clock activity is implemented with three classes:

  • SimClockActivity The actual activity which executes a given task.
  • SimClockActivityManager A singleton class which is responsible for coordinating execution of all SimClockActivity periodically (subject to their minimum desired periods).
  • SimClockThread A singleton thread which is responsible for the acutal updates to the RTT::os::TimeService and optinally subscribing to ROS messages on the /clock topic.

By default, SimClockThread is not running, but when it is started, it will override the normal RTT TimeService and update it based on the update rate of whatever SimClockThread is using as a clock source.

Usage

The SimClockActivity is used similarly to the RTT::PeriodicActivity. Once the rtt_rosclock service plugin has been loaded, you can set a number of tasks’ activities to SimClockActivities, set the clock source, and then enable the SimClockThread.


import("rtt_ros");
ros.import("rtt_rosclock");

// ... create components ...

my_component_1.setPeriod(0.01);
my_component_2.setPeriod(1.0);

// Set simulation clock activities
ros.clock.setSimClockActivity(my_component_1);
ros.clock.setSimClockActivity(my_component_2);

// Set the SimClockThread to use the ROS /clock topic for time
ros.clock.useROSClockTopic();

// Start simulation clock thread and override RTT clock
ros.clock.enableSim();


CHANGELOG

Changelog for package rtt_rosclock

2.9.2 (2019-05-15)

  • Merge pull request #112 from honeybee-robotics-forks/fix-rtt-rosclock-thread-segfault into 2.9.2
    • rtt_rosclock: fixing isSelf segfault when using simclock with ownthread operation caller
  • Contributors: Johannes Meyer, Jonathan Bohren

2.9.1 (2017-11-16)

  • Merge pull request #93 from ahoarau/xenomai3-support Xenomai 3 support
  • Contributors: Antoine Hoarau

2.9.0 (2017-05-02)

  • fix xenomai rtt_now() fix PR#41
  • Added individual changelogs and bumped versions to 2.9.0
  • rtt_rosclock: adapted SimClockActivity to the updated ActivityInterface with the master-update-hook-vs-callback-queue patch (orocos-toolchain/rtt#91) Signed-off-by: Johannes Meyer <<johannes@intermodalics.eu>>
  • Contributors: Antoine Hoarau, Johannes Meyer

2.8.6 (2017-11-15)

2.8.5 (2017-03-28)

2.8.4 (2016-11-26)

2.8.3 (2016-07-20)

  • fix xenomai rtt_now() fix PR#41
  • Contributors: Antoine Hoarau

2.8.2 (2015-06-12)

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged rtt_rosclock at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.8.6
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/orocos/rtt_ros_integration.git
VCS Type git
VCS Version jade-devel
Last Updated 2018-07-23
Dev Status MAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides an RTT plugin to access different time measurements on a realtime host.

Additional Links

Maintainers

  • Orocos Developers

Authors

No additional authors.

RTT ROSClock

This package contains helpful functions for measuring time according to different sources on a realtime operating system.

When running Orocos components in a ROS network, it’s important to keep time synchronized between different machines. If you use the standard RTT::TimeService calls to query time, this might be tens of seconds different from the NTP-corrected time and any timestamped messages published to ROS will be dramatically delayed.

To avoid these problems while staying realtime-safe (and portable), you can use the rtt_rosclock::host_now() function to get a ROS time structure that uses the CLOCK_HOST_REALTIME realtime time source on a Xenomai system. On a gnu/linux system, this call will just return the result of the standard ros::Time::now() function.

Use host_now() for broadcasting ROS Header Stamps

The rtt_rosclock::host_now() function is the time source that should always be used with ROS header timestamps because it is the time that you want to use to broadcast ROS messages to other machines or processes. It is assumed that if the /clock topic is active, then any ROS messages broadcasted are based on that time source.

When compiled against Xenomai and not running in simulation mode, this function will return the NTP-synchronized clock time via the CLOCK_HOST_REALTIME clock source. Note that this is only supported under Xenomai 2.6 and above.

When not compiled against Xenomai and not running in simulation mode, it is a pass-through to ros::Time::now().

When running in simulation mode, this will always use the simulation clock, which is based off of the ROS /clock topic. It is a pass-through to rtt_rosclock::rtt_now().

RTT Services

Clock Service

The “rosclock” RTT service also provides a sub-service of the global “ros” service called “ros.clock” which provides the following operations:

  • ros::Time ros.clock.host_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the sim clock.
  • ros::Time ros.clock.host_wall_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the wall clock.
  • ros::Time ros.clock.rtt_now(void) Get a ROS time structure from the RTT clock or the sim clock.
  • ros::Time ros.clock.rtt_wall_now(void) Get a ROS time structure from the RTT wall clock.
  • RTT::Seconds ros.clock.host_offset_from_rtt(void) Get the differences from the RTT wall clock source to the NTP-adjusted realtime clock source.

C++ API

The calls are also available via the rtt_rosclock/rtt_rosclock.h header:

  • ros::Time rtt_rosclock::host_now(void)
  • ros::Time rtt_rosclock::host_wall_now(void)
  • ros::Time rtt_rosclock::rtt_now(void)
  • ros::Time rtt_rosclock::rtt_wall_now(void)
  • RTT::Seconds rtt_rosclock::host_offset_from_rtt(void)

Simulation Clock Activity

This package also provides an RTT SimClockActivity which will periodically execute a task subject to the progression of a simulated clock source. This clock source can either be the ROS /clock topic if it exists and the /use_sim_time parameter is set to true, or it can use a manual time update from some other in-process source.

The simulation clock activity is implemented with three classes:

  • SimClockActivity The actual activity which executes a given task.
  • SimClockActivityManager A singleton class which is responsible for coordinating execution of all SimClockActivity periodically (subject to their minimum desired periods).
  • SimClockThread A singleton thread which is responsible for the acutal updates to the RTT::os::TimeService and optinally subscribing to ROS messages on the /clock topic.

By default, SimClockThread is not running, but when it is started, it will override the normal RTT TimeService and update it based on the update rate of whatever SimClockThread is using as a clock source.

Usage

The SimClockActivity is used similarly to the RTT::PeriodicActivity. Once the rtt_rosclock service plugin has been loaded, you can set a number of tasks’ activities to SimClockActivities, set the clock source, and then enable the SimClockThread.


import("rtt_ros");
ros.import("rtt_rosclock");

// ... create components ...

my_component_1.setPeriod(0.01);
my_component_2.setPeriod(1.0);

// Set simulation clock activities
ros.clock.setSimClockActivity(my_component_1);
ros.clock.setSimClockActivity(my_component_2);

// Set the SimClockThread to use the ROS /clock topic for time
ros.clock.useROSClockTopic();

// Start simulation clock thread and override RTT clock
ros.clock.enableSim();


CHANGELOG

Changelog for package rtt_rosclock

2.8.6 (2017-11-15)

2.8.5 (2017-03-28)

2.8.4 (2016-11-26)

2.8.3 (2016-07-20)

  • fix xenomai rtt_now() fix PR#41
  • Contributors: Antoine Hoarau

2.8.2 (2015-06-12)

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged rtt_rosclock at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.8.6
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/orocos/rtt_ros_integration.git
VCS Type git
VCS Version indigo-devel
Last Updated 2018-07-23
Dev Status MAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides an RTT plugin to access different time measurements on a realtime host.

Additional Links

Maintainers

  • Orocos Developers

Authors

No additional authors.

RTT ROSClock

This package contains helpful functions for measuring time according to different sources on a realtime operating system.

When running Orocos components in a ROS network, it’s important to keep time synchronized between different machines. If you use the standard RTT::TimeService calls to query time, this might be tens of seconds different from the NTP-corrected time and any timestamped messages published to ROS will be dramatically delayed.

To avoid these problems while staying realtime-safe (and portable), you can use the rtt_rosclock::host_now() function to get a ROS time structure that uses the CLOCK_HOST_REALTIME realtime time source on a Xenomai system. On a gnu/linux system, this call will just return the result of the standard ros::Time::now() function.

Use host_now() for broadcasting ROS Header Stamps

The rtt_rosclock::host_now() function is the time source that should always be used with ROS header timestamps because it is the time that you want to use to broadcast ROS messages to other machines or processes. It is assumed that if the /clock topic is active, then any ROS messages broadcasted are based on that time source.

When compiled against Xenomai and not running in simulation mode, this function will return the NTP-synchronized clock time via the CLOCK_HOST_REALTIME clock source. Note that this is only supported under Xenomai 2.6 and above.

When not compiled against Xenomai and not running in simulation mode, it is a pass-through to ros::Time::now().

When running in simulation mode, this will always use the simulation clock, which is based off of the ROS /clock topic. It is a pass-through to rtt_rosclock::rtt_now().

RTT Services

Clock Service

The “rosclock” RTT service also provides a sub-service of the global “ros” service called “ros.clock” which provides the following operations:

  • ros::Time ros.clock.host_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the sim clock.
  • ros::Time ros.clock.host_wall_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the wall clock.
  • ros::Time ros.clock.rtt_now(void) Get a ROS time structure from the RTT clock or the sim clock.
  • ros::Time ros.clock.rtt_wall_now(void) Get a ROS time structure from the RTT wall clock.
  • RTT::Seconds ros.clock.host_offset_from_rtt(void) Get the differences from the RTT wall clock source to the NTP-adjusted realtime clock source.

C++ API

The calls are also available via the rtt_rosclock/rtt_rosclock.h header:

  • ros::Time rtt_rosclock::host_now(void)
  • ros::Time rtt_rosclock::host_wall_now(void)
  • ros::Time rtt_rosclock::rtt_now(void)
  • ros::Time rtt_rosclock::rtt_wall_now(void)
  • RTT::Seconds rtt_rosclock::host_offset_from_rtt(void)

Simulation Clock Activity

This package also provides an RTT SimClockActivity which will periodically execute a task subject to the progression of a simulated clock source. This clock source can either be the ROS /clock topic if it exists and the /use_sim_time parameter is set to true, or it can use a manual time update from some other in-process source.

The simulation clock activity is implemented with three classes:

  • SimClockActivity The actual activity which executes a given task.
  • SimClockActivityManager A singleton class which is responsible for coordinating execution of all SimClockActivity periodically (subject to their minimum desired periods).
  • SimClockThread A singleton thread which is responsible for the acutal updates to the RTT::os::TimeService and optinally subscribing to ROS messages on the /clock topic.

By default, SimClockThread is not running, but when it is started, it will override the normal RTT TimeService and update it based on the update rate of whatever SimClockThread is using as a clock source.

Usage

The SimClockActivity is used similarly to the RTT::PeriodicActivity. Once the rtt_rosclock service plugin has been loaded, you can set a number of tasks’ activities to SimClockActivities, set the clock source, and then enable the SimClockThread.


import("rtt_ros");
ros.import("rtt_rosclock");

// ... create components ...

my_component_1.setPeriod(0.01);
my_component_2.setPeriod(1.0);

// Set simulation clock activities
ros.clock.setSimClockActivity(my_component_1);
ros.clock.setSimClockActivity(my_component_2);

// Set the SimClockThread to use the ROS /clock topic for time
ros.clock.useROSClockTopic();

// Start simulation clock thread and override RTT clock
ros.clock.enableSim();


CHANGELOG

Changelog for package rtt_rosclock

2.8.6 (2017-11-15)

2.8.5 (2017-03-28)

2.8.4 (2016-11-26)

2.8.3 (2016-07-20)

  • fix xenomai rtt_now() fix PR#41
  • Contributors: Antoine Hoarau

2.8.2 (2015-06-12)

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged rtt_rosclock at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.7.2
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/orocos/rtt_ros_integration.git
VCS Type git
VCS Version hydro-devel
Last Updated 2015-07-21
Dev Status MAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides an RTT plugin to access different time measurements on a realtime host.

Additional Links

Maintainers

  • Orocos Developers

Authors

No additional authors.

RTT ROSClock

This package contains helpful functions for measuring time according to different sources on a realtime operating system.

When running Orocos components in a ROS network, it’s important to keep time synchronized between different machines. If you use the standard RTT::TimeService calls to query time, this might be tens of seconds different from the NTP-corrected time and any timestamped messages published to ROS will be dramatically delayed.

To avoid these problems while staying realtime-safe (and portable), you can use the rtt_rosclock::host_now() function to get a ROS time structure that uses the CLOCK_HOST_REALTIME realtime time source on a Xenomai system. On a gnu/linux system, this call will just return the result of the standard ros::Time::now() function.

Use host_now() for broadcasting ROS Header Stamps

The rtt_rosclock::host_now() function is the time source that should always be used with ROS header timestamps because it is the time that you want to use to broadcast ROS messages to other machines or processes. It is assumed that if the /clock topic is active, then any ROS messages broadcasted are based on that time source.

When compiled against Xenomai and not running in simulation mode, this function will return the NTP-synchronized clock time via the CLOCK_HOST_REALTIME clock source. Note that this is only supported under Xenomai 2.6 and above.

When not compiled against Xenomai and not running in simulation mode, it is a pass-through to ros::Time::now().

When running in simulation mode, this will always use the simulation clock, which is based off of the ROS /clock topic. It is a pass-through to rtt_rosclock::rtt_now().

RTT Services

Clock Service

The “rosclock” RTT service also provides a sub-service of the global “ros” service called “ros.clock” which provides the following operations:

  • ros::Time ros.clock.host_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the sim clock.
  • ros::Time ros.clock.host_wall_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the wall clock.
  • ros::Time ros.clock.rtt_now(void) Get a ROS time structure from the RTT clock or the sim clock.
  • ros::Time ros.clock.rtt_wall_now(void) Get a ROS time structure from the RTT wall clock.
  • RTT::Seconds ros.clock.host_offset_from_rtt(void) Get the differences from the RTT wall clock source to the NTP-adjusted realtime clock source.

C++ API

The calls are also available via the rtt_rosclock/rtt_rosclock.h header:

  • ros::Time rtt_rosclock::host_now(void)
  • ros::Time rtt_rosclock::host_wall_now(void)
  • ros::Time rtt_rosclock::rtt_now(void)
  • ros::Time rtt_rosclock::rtt_wall_now(void)
  • RTT::Seconds rtt_rosclock::host_offset_from_rtt(void)

Simulation Clock Activity

This package also provides an RTT SimClockActivity which will periodically execute a task subject to the progression of a simulated clock source. This clock source can either be the ROS /clock topic if it exists and the /use_sim_time parameter is set to true, or it can use a manual time update from some other in-process source.

The simulation clock activity is implemented with three classes:

  • SimClockActivity The actual activity which executes a given task.
  • SimClockActivityManager A singleton class which is responsible for coordinating execution of all SimClockActivity periodically (subject to their minimum desired periods).
  • SimClockThread A singleton thread which is responsible for the acutal updates to the RTT::os::TimeService and optinally subscribing to ROS messages on the /clock topic.

By default, SimClockThread is not running, but when it is started, it will override the normal RTT TimeService and update it based on the update rate of whatever SimClockThread is using as a clock source.

Usage

The SimClockActivity is used similarly to the RTT::PeriodicActivity. Once the rtt_rosclock service plugin has been loaded, you can set a number of tasks’ activities to SimClockActivities, set the clock source, and then enable the SimClockThread.


import("rtt_ros");
ros.import("rtt_rosclock");

// ... create components ...

my_component_1.setPeriod(0.01);
my_component_2.setPeriod(1.0);

// Set simulation clock activities
ros.clock.setSimClockActivity(my_component_1);
ros.clock.setSimClockActivity(my_component_2);

// Set the SimClockThread to use the ROS /clock topic for time
ros.clock.useROSClockTopic();

// Start simulation clock thread and override RTT clock
ros.clock.enableSim();


CHANGELOG
No CHANGELOG found.

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged rtt_rosclock at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.9.2
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/orocos/rtt_ros_integration.git
VCS Type git
VCS Version toolchain-2.9
Last Updated 2022-07-09
Dev Status MAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides an RTT plugin to access different time measurements on a realtime host.

Additional Links

Maintainers

  • Orocos Developers

Authors

No additional authors.

RTT ROSClock

This package contains helpful functions for measuring time according to different sources on a realtime operating system.

When running Orocos components in a ROS network, it’s important to keep time synchronized between different machines. If you use the standard RTT::TimeService calls to query time, this might be tens of seconds different from the NTP-corrected time and any timestamped messages published to ROS will be dramatically delayed.

To avoid these problems while staying realtime-safe (and portable), you can use the rtt_rosclock::host_now() function to get a ROS time structure that uses the CLOCK_HOST_REALTIME realtime time source on a Xenomai system. On a gnu/linux system, this call will just return the result of the standard ros::Time::now() function.

Use host_now() for broadcasting ROS Header Stamps

The rtt_rosclock::host_now() function is the time source that should always be used with ROS header timestamps because it is the time that you want to use to broadcast ROS messages to other machines or processes. It is assumed that if the /clock topic is active, then any ROS messages broadcasted are based on that time source.

When compiled against Xenomai and not running in simulation mode, this function will return the NTP-synchronized clock time via the CLOCK_HOST_REALTIME clock source. Note that this is only supported under Xenomai 2.6 and above.

When not compiled against Xenomai and not running in simulation mode, it is a pass-through to ros::Time::now().

When running in simulation mode, this will always use the simulation clock, which is based off of the ROS /clock topic. It is a pass-through to rtt_rosclock::rtt_now().

RTT Services

Clock Service

The “rosclock” RTT service also provides a sub-service of the global “ros” service called “ros.clock” which provides the following operations:

  • ros::Time ros.clock.host_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the sim clock.
  • ros::Time ros.clock.host_wall_now(void) Get a ROS time structure from the NTP-adjusted realtime clock or the wall clock.
  • ros::Time ros.clock.rtt_now(void) Get a ROS time structure from the RTT clock or the sim clock.
  • ros::Time ros.clock.rtt_wall_now(void) Get a ROS time structure from the RTT wall clock.
  • RTT::Seconds ros.clock.host_offset_from_rtt(void) Get the differences from the RTT wall clock source to the NTP-adjusted realtime clock source.

C++ API

The calls are also available via the rtt_rosclock/rtt_rosclock.h header:

  • ros::Time rtt_rosclock::host_now(void)
  • ros::Time rtt_rosclock::host_wall_now(void)
  • ros::Time rtt_rosclock::rtt_now(void)
  • ros::Time rtt_rosclock::rtt_wall_now(void)
  • RTT::Seconds rtt_rosclock::host_offset_from_rtt(void)

Simulation Clock Activity

This package also provides an RTT SimClockActivity which will periodically execute a task subject to the progression of a simulated clock source. This clock source can either be the ROS /clock topic if it exists and the /use_sim_time parameter is set to true, or it can use a manual time update from some other in-process source.

The simulation clock activity is implemented with three classes:

  • SimClockActivity The actual activity which executes a given task.
  • SimClockActivityManager A singleton class which is responsible for coordinating execution of all SimClockActivity periodically (subject to their minimum desired periods).
  • SimClockThread A singleton thread which is responsible for the acutal updates to the RTT::os::TimeService and optinally subscribing to ROS messages on the /clock topic.

By default, SimClockThread is not running, but when it is started, it will override the normal RTT TimeService and update it based on the update rate of whatever SimClockThread is using as a clock source.

Usage

The SimClockActivity is used similarly to the RTT::PeriodicActivity. Once the rtt_rosclock service plugin has been loaded, you can set a number of tasks’ activities to SimClockActivities, set the clock source, and then enable the SimClockThread.


import("rtt_ros");
ros.import("rtt_rosclock");

// ... create components ...

my_component_1.setPeriod(0.01);
my_component_2.setPeriod(1.0);

// Set simulation clock activities
ros.clock.setSimClockActivity(my_component_1);
ros.clock.setSimClockActivity(my_component_2);

// Set the SimClockThread to use the ROS /clock topic for time
ros.clock.useROSClockTopic();

// Start simulation clock thread and override RTT clock
ros.clock.enableSim();


CHANGELOG

Changelog for package rtt_rosclock

2.9.2 (2019-05-15)

  • Merge pull request #112 from honeybee-robotics-forks/fix-rtt-rosclock-thread-segfault into 2.9.2
    • rtt_rosclock: fixing isSelf segfault when using simclock with ownthread operation caller
  • Contributors: Johannes Meyer, Jonathan Bohren

2.9.1 (2017-11-16)

  • Merge pull request #93 from ahoarau/xenomai3-support Xenomai 3 support
  • Contributors: Antoine Hoarau

2.9.0 (2017-05-02)

  • fix xenomai rtt_now() fix PR#41
  • Added individual changelogs and bumped versions to 2.9.0
  • rtt_rosclock: adapted SimClockActivity to the updated ActivityInterface with the master-update-hook-vs-callback-queue patch (orocos-toolchain/rtt#91) Signed-off-by: Johannes Meyer <<johannes@intermodalics.eu>>
  • Contributors: Antoine Hoarau, Johannes Meyer

2.8.6 (2017-11-15)

2.8.5 (2017-03-28)

2.8.4 (2016-11-26)

2.8.3 (2016-07-20)

  • fix xenomai rtt_now() fix PR#41
  • Contributors: Antoine Hoarau

2.8.2 (2015-06-12)

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged rtt_rosclock at Robotics Stack Exchange