-
Notifications
You must be signed in to change notification settings - Fork 60
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
refactor: use control_cmd_auto instead #1020
Conversation
@xmfcx Thank you for your contribution! But, in this repository, we need backwards compatibility to merge changes into master. If this interface change was made after estimating that the change on the simulator side was only the change in this PR, it may be a miscalculation of the cost. |
I don't have the access to the instances/systems that could be affected by this. So I am disappointed by the fact that we have miscalculated the costs.
@HansRobo what do you think? |
I apologize for having told about the problem of TIER IV internal.
thank you for your nice suggestions |
@HansRobo I will test it out on a small test repository then. |
If I do following for $ ros2 topic info /chatter
Type: std_msgs/msg/String sub_str_ = create_subscription<std_msgs::msg::String>(
"/chatter", 10, [](const std_msgs::msg::String::SharedPtr msg) {
RCLCPP_INFO_STREAM(rclcpp::get_logger("test_node"), "Received: " << msg->data);
});
try {
sub_f32_ = create_subscription<std_msgs::msg::Float32>(
"/chatter", 10, [](const std_msgs::msg::Float32::SharedPtr msg) {
RCLCPP_INFO_STREAM(rclcpp::get_logger("test_node"), "Received: " << msg->data);
});
} catch (const std::exception & e) {
RCLCPP_ERROR_STREAM(rclcpp::get_logger("test_node"), e.what());
} It catches the exception and subscription keeps working:
So it is possible to keep trying to subscribe with both, alternating between two, attempt to subscribe until it works. But this would be a very ugly solution. Pick the fitting subscriber based on the Autoware's version@mitsudome-r @HansRobo what about we let the scenario simulator query the autoware version and pick the appropriate subscriber type according to the version? Right now, this service returns the @mitsudome-r @HansRobo @isamu-takagi what do you think? |
@xmfcx |
@mitsudome-r exactly, this is what I had in mind. If Autoware version is not published, it should assume it's old. And if it is published, it can act depending on the version. I think it's a very clean solution. |
As I mentioned here,I think one of the good ways to get the version is getting it via a macro or constant values, in dedicated header file, for software that compiles with Autoware like With this method, it is possible to detect old Autoware.Core by judging the existence of header files as follows. #if __has_include(<autoware_version_manager/version_autoware.hpp>)
#include <autoware_version_manager/version_autoware.hpp> // to include VERSION_AUTOWARE macro
std::cout << "autoware version: " << VERSION_AUTOWARE << std::endl;
#else
std::cout << "Autoware is too old to get version via header file" << std::endl;
#endif |
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
f162e9f
to
b35a24f
Compare
I'm closing all of my message migration PRs. |
Types of PR
Link to the issue
Part of: autowarefoundation/autoware.universe#3674
Description
Using this,
Autoware will publish:
/control/command/control_cmd
autoware_msgs
/control/command/control_cmd_auto
autoware_auto_msgs
To enable compatibility, this PR renames the incoming topic to suffix
_auto
.How to review this PR.
Others