Skip to content

Commit

Permalink
feat: adapt main to remove ros arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
hiikariri committed Jun 16, 2024
1 parent b935aaf commit 30a554f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tachimawari_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@

int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);
auto args = rclcpp::init_and_remove_ros_arguments(argc, argv);

if (argc < 2) {
if (argc < args.size()) {
std::cerr << "Please specify the mode! [sdk / cm740]" << std::endl;
return 0;
} else if (argc < 3) {
std::cerr << "Please specify the tf configuration path" << std::endl;
}

std::string mode = argv[1];
std::string path = argv[2];
std::string mode = args[1];
std::string path = args[2];
std::shared_ptr<tachimawari::control::ControlManager> controller;

if (mode == "sdk") {
Expand Down

0 comments on commit 30a554f

Please sign in to comment.