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

[cartographer_node-1] ERROR: unknown command line flag #1312

Closed
AndreasAZiegler opened this issue Oct 29, 2019 · 12 comments
Closed

[cartographer_node-1] ERROR: unknown command line flag #1312

AndreasAZiegler opened this issue Oct 29, 2019 · 12 comments
Assignees

Comments

@AndreasAZiegler
Copy link

AndreasAZiegler commented Oct 29, 2019

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04.1 LTS
  • Version or commit hash:
  • DDS implementation:
    • standard (I guess Fast-RTPS)

Steps to reproduce issue

  • In the first terminal in workspace
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models
export TURTLEBOT3_MODEL=burger
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
  • In the second terminal in workspace
ros2 launch nav2_bringup nav2_navigation_launch.py
  • In the third terminal in workspace
ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True

Expected behavior

Cartographer starting up and robot shown in rviz2

Actual behavior

Cartographer gives the following errors:

ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True
[WARN] [rcl]: Found remap rule 'use_sim_time:=True'. This syntax is deprecated. Use '--ros-args --remap use_sim_time:=True' instead.
[INFO] [launch]: All log files can be found below /home/andreasziegler/.ros/log/2019-10-29-15-26-54-078724-AndreasZiegler-1779
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [cartographer_node-1]: process started with pid [1792]
[INFO] [occupancy_grid_node-2]: process started with pid [1793]
[INFO] [rviz2-3]: process started with pid [1794]
[occupancy_grid_node-2] ERROR: unknown command line flag 'params-file'
[occupancy_grid_node-2] ERROR: unknown command line flag 'r'
[occupancy_grid_node-2] ERROR: unknown command line flag 'ros-args'
[cartographer_node-1] ERROR: unknown command line flag 'params-file'
[cartographer_node-1] ERROR: unknown command line flag 'r'
[cartographer_node-1] ERROR: unknown command line flag 'ros-args'
[ERROR] [occupancy_grid_node-2]: process has died [pid 1793, exit code 1, cmd '/opt/ros/eloquent/lib/cartographer_ros/occupancy_grid_node -resolution 0.05 -publish_period_sec 1.0 --ros-args -r __node:=occupancy_grid_node --params-file /tmp/launch_params_738fh22r'].
[ERROR] [cartographer_node-1]: process has died [pid 1792, exit code 1, cmd '/opt/ros/eloquent/lib/cartographer_ros/cartographer_node -configuration_directory /home/andreasziegler/ros/ros2_turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config -configuration_basename turtlebot3_lds_2d.lua --ros-args -r __node:=cartographer_node --params-file /tmp/launch_params_46p7kg0a'].

Additional information

I installed ros eloquent via apt. To install the navigation stack and to install the turtlebot stuff, I followed this guide.

@mlherd mlherd self-assigned this Oct 29, 2019
@mlherd
Copy link
Contributor

mlherd commented Oct 29, 2019

@AndreasAZiegler

If you followed the instructions in the use case tutorial, they are for ROS2 Dashing. In ROS2 Elequent (Master branch) the way you should set arguments is different. I will update the tutorial, but in the meantime, you can try to use the following command instead.

ros2 launch turtlebot3_cartographer cartographer.launch.py --ros-args use_sim_time:=True

Also, here you can find more information about how to set parameters and do remapping in the commend line.

@AndreasAZiegler
Copy link
Author

AndreasAZiegler commented Oct 30, 2019

@mlherd Thanks for your answer
With

ros2 launch turtlebot3_cartographer cartographer.launch.py --ros-args use_sim_time:=True

I do not longer get the

[WARN] [rcl]: Found remap rule 'use_sim_time:=True'. This syntax is deprecated. Use '--ros-args --remap use_sim_time:=True' instead.

But I still get these errors which seem to crash the cartographer_node

[occupancy_grid_node-2] ERROR: unknown command line flag 'params-file'
[occupancy_grid_node-2] ERROR: unknown command line flag 'r'
[occupancy_grid_node-2] ERROR: unknown command line flag 'ros-args'
[ERROR] [occupancy_grid_node-2]: process has died [pid 3003, exit code 1, cmd '/opt/ros/eloquent/lib/cartographer_ros/occupancy_grid_node -resolution 0.05 -publish_period_sec 1.0 --ros-args -r __node:=occupancy_grid_node --params-file /tmp/launch_params_axv1re_t'].
[cartographer_node-1] ERROR: unknown command line flag 'params-file'
[cartographer_node-1] ERROR: unknown command line flag 'r'
[cartographer_node-1] ERROR: unknown command line flag 'ros-args'
[ERROR] [cartographer_node-1]: process has died

@mlherd
Copy link
Contributor

mlherd commented Oct 30, 2019

It seems like I forgot to add -p :) Can you try the following command instead.

ros2 launch turtlebot3_cartographer cartographer.launch.py --ros-args -p use_sim_time:=True

@AndreasAZiegler
Copy link
Author

Unfortunately, it looks like it makes no difference:

ros2 launch turtlebot3_cartographer cartographer.launch.py --ros-args -p use_sim_time:=True
[INFO] [launch]: All log files can be found below /home/andreasziegler/.ros/log/2019-10-30-11-01-55-090948-AndreasZiegler-2211
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [cartographer_node-1]: process started with pid [2226]
[INFO] [occupancy_grid_node-2]: process started with pid [2227]
[INFO] [rviz2-3]: process started with pid [2228]
[occupancy_grid_node-2] ERROR: unknown command line flag 'params-file'
[occupancy_grid_node-2] ERROR: unknown command line flag 'r'
[occupancy_grid_node-2] ERROR: unknown command line flag 'ros-args'
[ERROR] [occupancy_grid_node-2]: process has died [pid 2227, exit code 1, cmd '/opt/ros/eloquent/lib/cartographer_ros/occupancy_grid_node -resolution 0.05 -publish_period_sec 1.0 --ros-args -r __node:=occupancy_grid_node --params-file /tmp/launch_params_mmo84aca'].
[cartographer_node-1] ERROR: unknown command line flag 'params-file'
[cartographer_node-1] ERROR: unknown command line flag 'r'
[cartographer_node-1] ERROR: unknown command line flag 'ros-args'
[ERROR] [cartographer_node-1]: process has died [pid 2226, exit code 1, cmd '/opt/ros/eloquent/lib/cartographer_ros/cartographer_node -configuration_directory /home/andreasziegler/ros/ros2_turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config -configuration_basename turtlebot3_lds_2d.lua --ros-args -r __node:=cartographer_node --params-file /tmp/launch_params_7xkwqfop'].

@AndreasAZiegler
Copy link
Author

Is there anything else I could provide to help troubleshooting?

@yathartha3
Copy link
Contributor

yathartha3 commented Oct 31, 2019

@AndreasAZiegler

If it is params file causing the problem you can specify the param file that you want to use in the launch file itself. Maybe peeking at nav2_bringup.launch in the nav2_bringup directory will help.
Are you using the latest ROS2?

@AndreasAZiegler
Copy link
Author

AndreasAZiegler commented Nov 1, 2019

The only places I found params-file was in src/navigation2/nav2_system_tests/src/updown/test_updown_launch.py and in /src/navigation2/nav2_common/nav2_common/launch/node.py but as cartographer_node is started directly in cartographer.launch.py I don't think that's related.

Could it be related to this issue?

I just pulled the master branch and have commit 1a1070ae8fd4aa19436773bd0877f5ec093f9170

@mlherd
Copy link
Contributor

mlherd commented Nov 4, 2019

@AndreasAZiegler Which method did you use to build or install Cartographer?

@AndreasAZiegler
Copy link
Author

I installed it view apt-get install and have the following packages installed:

ros-eloquent-cartographer                           1.0.0-1bionic.20191024.042253        amd64        Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
ros-eloquent-cartographer-ros                       1.0.9000-1bionic.20191024.122706     amd64        Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
ros-eloquent-cartographer-ros-msgs                  1.0.9000-1bionic.20191024.070421     amd64        ROS messages for the cartographer_ros package

@mlherd
Copy link
Contributor

mlherd commented Nov 7, 2019

It seems like the turtlebot_cartographer launch file needs to be updated for eloquent or the way the cartographer nodes are executed is not correct. I would open an issue in their repo and check if anyone has run into the same issue.

It requires a little bit more work, but you can look at what they do in their launch file and try to execute the nodes yourself. I haven't tested cartographer eloquent release to create maps yet, but I was able to install the package via apt and run cartographer_node and occupancy_grid_node individually.

ex:
ros2 run cartographer_ros cartographer_node -configuration_directory PATH_TO/config -configuration_basename turtlebot3_lds_2d.lua

PS: This might happen because Cartographer is not maintained and updated regularly.

@mlherd
Copy link
Contributor

mlherd commented Nov 7, 2019

Since this is not a Navigation2 related issue, I close it. When you find a solution to this issue, please feel free to add a comment. I will do the same.

@ribinmathew
Copy link

It seems like the turtlebot_cartographer launch file needs to be updated for eloquent or the way the cartographer nodes are executed is not correct. I would open an issue in their repo and check if anyone has run into the same issue.

It requires a little bit more work, but you can look at what they do in their launch file and try to execute the nodes yourself. I haven't tested cartographer eloquent release to create maps yet, but I was able to install the package via apt and run cartographer_node and occupancy_grid_node individually.

ex:
ros2 run cartographer_ros cartographer_node -configuration_directory PATH_TO/config -configuration_basename turtlebot3_lds_2d.lua

ran into same issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants