turtlebot / turtlebot4_setup

TurtleBot 4 setup tools and configuration files.
Apache License 2.0
18 stars 5 forks source link

Robot Upstart unable to find the turtlebot4.service #8

Closed sumitpaulde closed 9 months ago

sumitpaulde commented 9 months ago
failed to stop turtlebot4.service: Unit turtlebot4.service not loaded.
Traceback (most recent call last):
  File "/opt/ros/humble/lib/turtlebot4_setup/turtlebot4_setup", line 246, in <module>
    main()
  File "/opt/ros/humble/lib/turtlebot4_setup/turtlebot4_setup", line 242, in main
    setup.run()
  File "/opt/ros/humble/lib/turtlebot4_setup/turtlebot4_setup", line 186, in run
    self.menu.show()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/menu.py", line 95, in show
    self.menu_entries[self.menu_sel].select()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/menu.py", line 29, in select
    self.function()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/ros_setup.py", line 37, in show
    self.menu.show()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/menu.py", line 95, in show
    self.menu_entries[self.menu_sel].select()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/menu.py", line 29, in select
    self.function()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/ros_setup.py", line 244, in show
    self.menu.show()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/menu.py", line 95, in show
    self.menu_entries[self.menu_sel].select()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/menu.py", line 29, in select
    self.function()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/ros_setup.py", line 265, in install
    self.uninstall()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/turtlebot4_setup/ros_setup.py", line 297, in uninstall
    workspace_setup=os.environ['ROBOT_SETUP'])
  File "/usr/lib/python3.10/os.py", line 680, in __getitem__
    raise KeyError(key) from None
KeyError: 'ROBOT_SETUP'
[ros2run]: Process exited with failure 1

To Reproduce Take a fresh sd card follow the instructions to build the turtlebot4 from the source for Humble.

roni-kreinin commented 9 months ago

@sumitpaulde Is the $ROBOT_SETUP environment variable defined in ~/.bashrc?

See https://github.com/turtlebot/turtlebot4_setup/blob/d499511be43fc85091d9bd25a809cff1167dd7c6/scripts/turtlebot4_setup.sh#L56

sumitpaulde commented 9 months ago

Hi @roni-kreinin

The path for me was different and I had to change the path in the bashrc. After that I faced another error

Dec 07 11:44:20 ubuntu turtlebot4-start[2368]: ls: cannot access '/etc/ros/humble/turtlebot4.d/*.xacro': No such file or directory

I had to install

sudo apt install ros-humble-xacro

Now the Robot Startup works.