Questions tagged [rostime]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

Mocking ros::Time::now in rostest/gtest

I am running the tests for my ROS C++ node using rostest/gtest. Currently I have a problem where I have a class method that I need/want to test that out of date data based on the value of ...
Ricardo Marques's user avatar
0 votes
2 answers
94 views

ros2 foxy - set / publish simulation time and enable use_sim_time

Dear Robotics Community, I have a simple problem. I working with ros2 foxy and have a simulator (not important for the question). I want to set the ros clock from my simulator-loop such that I can use ...
klanky's user avatar
  • 13
2 votes
1 answer
852 views

how to use the rate.sleep function properly

So I have a task of making turtle sim draw a heart using parametric equations I don't know if all my equations are correct but here's my code ...
Ahmed Sallam's user avatar
0 votes
1 answer
18 views

ros::Walltime differs from chrono::clock?

Hi! I recently wanted to improve the computational efficiency of IPOPT solver and my costumed mpc_local_planner. Before that my mpc_local_node was taking 0.3-0.5s per iteration, which obviously does ...
user avatar
0 votes
1 answer
20 views

Query on get_clock()->now()

Hi, I am trying to update the msg header stamp using the below method. custom_msg.header.stamp = get_clock()->now(); Seems like this updates both ...
user avatar
0 votes
1 answer
4 views

What is the best way to determine the time it takes a service to return?

Hi, I am using ROS Melodic on Ubuntu 18.04 Is there some ROS function that returns the execution duration of a ROS service? Or is the easiest way to get the execution duration to ...
user avatar
0 votes
1 answer
15 views

Converting ros::Time to C++ string

How can we convert the result of ros::Time::now() into std::string, given that ...
user avatar
0 votes
1 answer
5 views

ros::Time::isValid doesn't do what we think it does?

From the documentation (http://docs.ros.org/melodic/api/rostime/html/classros_1_1Time.html#a84cd12a499c70fb3eefce89cda2b6113), ros::Time::isValid returns "whether or not the current time is valid....
user avatar
0 votes
1 answer
14 views

Tried to insert a message with time less than ros::TIME_MIN Aborted (core dumped)

Hello, after successfully reading .pcd file from a file as asked on my previous post I was trying to to write to a rosbag but it ...
user avatar
0 votes
1 answer
14 views

Time Sync between rosserial on Windows & RosMaster on linux

The problem is: how can I sync time between rosserial node on Windows xp and RosMaster on Linux. A robot controlled by WinXP is communicating to ROSMaster on a ubuntu14.04. Everything was ok until I ...
user avatar
0 votes
1 answer
13 views

How exactly does ROS "Exact Time" policy work, for a time synchronizer?

Quick question, I'm trying to understand more in depth how this aspect of ROS works. As per the title, does exact time policy really mean that the timestamp of the messages being compared have to be ...
user avatar
0 votes
1 answer
11 views

How to solve different ros::Time error message

I have a total of N. 7 .csv files. Those files are the result of N.7 sensors mounted on an underwater system. After packing both custom and standard messages ...
user avatar
0 votes
1 answer
1 view

truncating ros time

Hi, Is there anyway i could truncate the ros time value to certain length, lets say i need the time value to be only up to a certain decimal points Originally posted by lahiruherath on ROS Answers ...
user avatar
0 votes
1 answer
4 views

Duration of 1 second during while(ros::ok())

Hi All, Below is the snippet of the code I have. ...
user avatar
0 votes
1 answer
1 view

Time delay between the cycles

Hi Guys, I have below snippet of the code. ...
user avatar
0 votes
1 answer
2 views

Cant publish a time object

I am trying to publish the current wallclock time but some how during the build process it always gives an error : ...
user avatar
0 votes
1 answer
77 views

rospy.exceptions.ROSInitException - time is not initialized

Hello, I was just testing my websocket, for which I was using the basic ros publisher subscriber tutorial. These worked until last week, and I haven't touched this package until today. error thrown ...
user avatar
0 votes
1 answer
2 views

TypeError: Cannot compare to non-Duration

I want to ignore the immediate call to a function. Hence I need to keep track of the time at which the function was invoked. In other words, I want to skip the function call, if the function is being ...
ravi's user avatar
  • 1,336
0 votes
1 answer
2 views

How do I change the filename_format of picture to rostime?

Dear All: At present the Bag file change a picture file. File name are frame000001,frame000002...... How do I change the filename_format of picture to rostime? Originally posted by lin on ROS ...
user avatar
0 votes
1 answer
4 views

About the 'time stamps' error in ROS

Hello,I am doing some work on ROS navigation,just at the start,and I encountered some problems.When I roslaunch the *.launch,there are a lot of erros like this:...
user avatar
0 votes
1 answer
1 view

¿How can i get the exact date and hour of an event?

Hello guys, I'm having a problem with ROS Time, I need for a protect the exact Time and the exact Hour at which some event happened. I tried with ros time, but I don't see any equivalences between the ...
user avatar
0 votes
1 answer
3 views

Publish at the time of a vector

Dears, I have a vector containing double type numbers representing the ros time that I recorded from a previous simulation. I need to publish data of a node at this given time. I try to explain better:...
user avatar
0 votes
1 answer
4 views

difference between usage of rostime::Now & toSec for Matlab

Hello everyone, i have some troubles and hope that you can help me. I want to use the time that i got from ROS in Matalb. First i used the command ros::Time::now(); and i got for each frame a ...
user avatar
0 votes
1 answer
26 views

Rostime convention: sec+nsec vs microsec

Hi there! Current ros::Time represents time in a form of sec and nsec. Was there any particular reason for choosing this representation or are there any particular advantages of it? We currently ...
user avatar
0 votes
1 answer
13 views

Integer to Ros::time

Hi! I have a txt file with encoderdata and timestamps. I am reading from this file and want to put this timestamps in variables declared as Ros::time, but I cant manage to get this right. Is it ...
user avatar
0 votes
1 answer
15 views

Pause execution of program from callback function

In my main, I have defined a callback function with the following code: ...
user avatar
0 votes
1 answer
7 views

How can I get time difference of two messages published by same publisher on same topic?

I need to calculate time gap between two messages from same publisher on same topic and print it in printable format like string. Please somebody help me. Originally posted by cybodroid on ROS ...
user avatar
0 votes
1 answer
11 views

timestamps for ros topics not updating smoothly

I noticed that the timestamps associated with my topics is not updating smoothly. It will go for several messages without changing (or changing by some very small amount), then change a lot all of a ...
user avatar
0 votes
1 answer
8 views

ros::Time.now().toSec() optimized out

Dear all, Using ROS Hydro on Ubuntu 12.04. I am trying to see the result of ros::Time.now().toSec() while debugging a node, but the debugger says the value is optimized out. I know that normally we ...
user avatar
0 votes
2 answers
17 views

Use ros::Time without master

Is there anyway to use the structures and functions in ros::Time without the requirement to initialize a node and connect to a master? I want to use it as part of a test fixture for a library that ...
user avatar
0 votes
1 answer
3 views

ros::Time doesn't update in variable

I have trimmed most of the irrelevant code from this post. ...
user avatar
0 votes
1 answer
6 views

How to get time for 1 looping program in ROS node?

Hi ROS fans.. How to get time for 1 looping program in ROS node ?? I hope someone can help me ^_^ Originally posted by Rizqa on ROS Answers with karma: 45 on 2013-05-30 Post score: 0 Original ...
user avatar
0 votes
1 answer
2 views

Why does ROS_INFO_STREAM print two time stamps?

When I use ROS_INFO_STREAM, it prints two timestamps: [ INFO] [1348651448.232151821, 1323877497.479939999]: Hello World! What do they represent? I looked at the ...
user avatar
0 votes
2 answers
2 views

Will this Project be possible? / ROS Time Syncronisation

Hi Guys, I would like to discuss the doability of a project. I want to run a couple of ARM Boards (Pandaboard ES) which are connected to each other with an Ethernet-switch. The Boards already run ROS ...
user avatar
0 votes
1 answer
4 views

Time issue after changing type of time

I received a warning that is related to timing issue. This warning causes my node that is supposed to transform LaserScan to PointCloud not working. If I use my dataset's timestamp, it will be fine, ...
user avatar
0 votes
1 answer
6 views

TransformListener Could not find a common time /base_link and /map

I recorded bags on different computers/robots during an experiment and now I'm trying to replay them. All computers were synchronized with chrony. Now, I play all bags with the same rosbag command. ...
user avatar
0 votes
1 answer
11 views

roscpp using simulated time

I am trying to run gmapping_slam on some old data to improve the position estimate and during my use of the resulting /map -> /odom I realized the stamp on the transforms were using the current ...
wjwwood's user avatar
  • 6,507
0 votes
1 answer
6 views

Different time zones between ros nodes

Browsing the ros::now() code I've seen that it returns the local time, if I'm not mistaken it can cause some issues between computers that are on different time zones. For instance, a robot might be ...
user avatar
0 votes
1 answer
3 views

Gazebo camera timestamp issue

If I use a gazebo camera like this: ...
user avatar
0 votes
1 answer
5 views

Is it safe to change system date/time during execution

Reading on how ros Time is implemented, it looks like it uses system wall-time. http://www.ros.org/wiki/Clock Would it be safe to change system time when ros nodes are running? We plan to synchronize ...
user avatar
0 votes
2 answers
5 views

use gazebo with walltime

Hi, I would like to use gazebo with walltime, so that the movement of the robot is exactly the same like in the real world. For example I used the trajectory_msgs/JointTrajectory message and set up ...
user avatar
0 votes
1 answer
7 views

Does rospy not have walltime?

I was under the impression that anything in roscpp should also be available in rospy. WallTime is in roscpp but I can't find it in rospy. Originally posted by Asomerville on ROS Answers with karma: ...
user avatar
0 votes
1 answer
6 views

Time jumped forward

Hi folks, I am receiving some error messages from everything that uses planning_environment (OMPL, Trajectory Filter, you name it!), namely that the joint_states messages are discarded and I should ...
user avatar