Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate non-stamped twist for tricycle_controller and steering_controllers #1093

Merged
merged 3 commits into from
May 8, 2024

Conversation

christophfroehlich
Copy link
Contributor

First step of #989.

@christophfroehlich christophfroehlich added the backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron. label Apr 4, 2024
@christophfroehlich christophfroehlich changed the title Deprecate non-stamped twist for tricycle_controller Deprecate non-stamped twist for tricycle_controller and steering_controllers Apr 4, 2024
Copy link
Contributor

@olivier-stasse olivier-stasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just a small remark, it will not be possible to send directly a command to a robot using DiffDrive controller from a console.

That was nice to switch easily from turtlesim to a real robot from a pedagogical point of view. But the auto completion in ROS-2 with pub topic is not working super nicely from my experience. If anybody has a nice way to have a simple example for ros2 topic pub /cmd_vel, it will be nice to document it.

@christophfroehlich
Copy link
Contributor Author

christophfroehlich commented Apr 5, 2024

Just a small remark, it will not be possible to send directly a command to a robot using DiffDrive controller from a console.

That was nice to switch easily from turtlesim to a real robot from a pedagogical point of view. But the auto completion in ROS-2 with pub topic is not working super nicely from my experience. If anybody has a nice way to have a simple example for ros2 topic pub /cmd_vel, it will be nice to document it.

You mean because it is not possible to auto-fill the time-stamp in the header? Or that the syntax of the nested msg is tedious?
https://control.ros.org/master/doc/ros2_control_demos/example_2/doc/userdoc.html

@olivier-stasse
Copy link
Contributor

You mean because it is not possible to auto-fill the time-stamp in the header? Or that the syntax of the nested msg is tedious? https://control.ros.org/master/doc/ros2_control_demos/example_2/doc/userdoc.html

Actually both. (BTW thanks again for the documentation effort this is great !) With the auto completion I never managed to have the nice example you gave in the docs. I do not remember if there is a default acceptable value for the time stamp like 0 for all the fields.

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do we want to completely remove it in Jazzy or leave it with a deprecation warning?

I agree with @olivier-stasse. I believe it should be fine to publish with 0 timestamp as it is usually considered as the command sent with the current timestamp

@christophfroehlich
Copy link
Contributor Author

LGTM. Do we want to completely remove it in Jazzy or leave it with a deprecation warning?

Yes, I think we will completely remove it. I'm not sure if there will be a rolling release before jazzy, but I thought at least we can backport the deprecation warning to iron.

I agree with @olivier-stasse. I believe it should be fine to publish with 0 timestamp as it is usually considered as the command sent with the current timestamp

Is this a feature of ROS 2 CLI or does the controller just have to "ignore" zero timestamp? I'd have to test that

@christophfroehlich
Copy link
Contributor Author

christophfroehlich commented Apr 5, 2024

Actually both. (BTW thanks again for the documentation effort this is great !)

🙃

With the auto completion I never managed to have the nice example you gave in the docs. I do not remember if there is a default acceptable value for the time stamp like 0 for all the fields.

I also struggle always there. Sometimes it's faster to ask my AI friend for the syntax than trying around..

@saikishor
Copy link
Member

Is this a feature of ROS 2 CLI or does the controller just have to "ignore" zero timestamp? I'd have to test that

I think the controller is the one who has to consider the zero timestamps as the recent one. Upon checking the code, this is already handled. In fact in most of the ROS/ROS2 systems it is considered like that

if ((msg->header.stamp.sec == 0) && (msg->header.stamp.nanosec == 0))
{
RCLCPP_WARN_ONCE(
get_node()->get_logger(),
"Received TwistStamped with zero timestamp, setting it to current "
"time, this message will only be shown once");
msg->header.stamp = get_node()->get_clock()->now();
}

@bmagyar
Copy link
Member

bmagyar commented Apr 6, 2024

I think the clunkiness comes from the CLI auto complete offering a one-lined yaml as opposed to the JSON format (dict with curly brackets)

@bmagyar bmagyar merged commit 009f946 into master May 8, 2024
10 of 11 checks passed
@bmagyar bmagyar deleted the deprecate_non_stamped branch May 8, 2024 17:31
mergify bot pushed a commit that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants