-
Notifications
You must be signed in to change notification settings - Fork 0
/
ros1-to-ros2-code-spec.json
36 lines (36 loc) · 1.6 KB
/
ros1-to-ros2-code-spec.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"function_calls": {
"ros::ok()": "rclcpp::ok()",
"ros::shutdown()": "rclcpp::shutdown()",
"ros::init": {
"pattern": "ros::init\\(argc, argv, [^)]*\\)",
"replace": "rclcpp::init(argc, argv)"
},
"ROS_INFO": {
"node_in_scope": {
"pattern": "ROS_INFO\\(<the-args>\\) // need a C++ parser!!!",
"replace": "RCLCPP_INFO(<node-name>->get_logger(), <the-args>)"
},
"no_node_in_scope": {
"pattern": "ROS_INFO(<the-args>); // really not sure what to do here, really need a C parser for this",
"replace": "char* fresh; sprintf(fresh, <the-args>); std::cout << fresh << endl; // this really depends on the first thing in <the-args> being a template string",
"req_pkgs": [
"<iostream>"
]
}
}
},
"types": {
"ros::Rate": "rclcpp::Rate",
"std_msgs::String": "std_msgs::msg::String",
"boost::shared_ptr" : "std::shared_ptr",
"boost::mutex::scoped_lock" : "std::unique_lock<std::mutex>",
"boost::mutex" : "std::mutex",
"boost::unordered_map" : "std::unordered_map",
"boost::function" : "std::function",
"std_msgs::String::ConstPtr&": "std_msgs::msg::String::SharedPtr",
"std_msgs::StringConstPtr&": "std_msgs::msg::String::SharedPtr",
"boost::shared_ptr<std_msgs::String const>": "const std_msgs::msg::String::SharedPtr",
"const boost::shared_ptr<std_msgs::String>&": "const std_msgs::msg::String::SharedPtr"
}
}