Closed lz89 closed 6 years ago
@lz89 , did you find an answer to this?
@diogoalmeida Hi, I haven't found the answer yet. Hope Yoshua could give some hints. Thanks!
Ok, @YoshuaNava is informed. Issue is that since we actually don't use RWS in our systems, it might be hard to come up with a straightforward answer. Maybe @jontje can help?
Unfortunately I am not familiar with how the RWS interaction has been set up in this code. The sampling_rate_
appears to have more to do with the ROS side of things, rather than the robot controller side.
@diogoalmeida, @lz89, @jontje
Period declaration: This variable is there for the sake of having a ROS duration object that we can use for estimating the time that has passed between loops. https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/src/yumi_hw_ifce_node.cpp#L129
We end up using that inter-loop duration to estimate the joint velocities (which are not given by EGM), with exponential smoothing in: https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/src/yumi_hw_egm.cpp#L473 https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/include/yumi_hw/yumi_hw_rws.h#L316
Sampling rate This part of the code comes from the original Orebro branch. I think it's there just for consistency, so that the assumed sampling time can always be retrieved in the program. https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/include/yumi_hw/yumi_hw_rws.h#L258
RWS or EGM control period
If at any moment you want to check the duration of the control loop, just subscribe to the topic /yumi/egm_control_period
(As this works for both RWS and EGM, we will rename the topic as '/yumi/control_period' in our next update)
Closing this as it seems dead.
I wonder where I can set the control rate of the RWS interface? I know the maximum is 10Hz based on the wiki. I read through the code in yumi_hw package, and find the following. The following function is called in a thread:
The
sampling_rate_
is set to 0.1, but it is not being set anywhere. https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/include/yumi_hw/yumi_hw_rws.h#L258However, the control period in the
yumi_hw_ifce_node.cpp
is set to 1.0 second as shown:https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/src/yumi_hw_ifce_node.cpp#L129
I also saw that in the
YumiRapidInterface
, the spinOnce() ofindustrial::message_manager::MessageManager
is called in each loop, as shown:https://github.com/kth-ros-pkg/yumi/blob/cb56067ea661670af179c179a02dd2197442be58/yumi_hw/include/yumi_hw/yumi_hw_rws.h#L180
The document of
industrial::message_manager::MessageManager
states that:So where this minimum rate is defined/configured for YuMi, and is it 10Hz in this case?
Thank you.