How to Run ros2 launch file using service file [closed]
Hi, I am trying to run launch file in ros2 using service file but I am unable to do it.
[Unit]
After=network-online.target
Description=desc
[Service]
Environment=source home/$USER/dev_ws/install/setup.bash
ExecStart=ros2 launch topics topic.launch.py
RemainAfterExit=no
Restart=on-failure
RestartSec=2s
[Install]
WantedBy=user.target
This is the error I am getting
Invalid environment assignment, ignoring: source
Feb 09 09:59:54 USER-pc systemd[1]: /etc/systemd/system/name.service:6: Invalid environment assignment, ignoring: home/USER/dev_ws/install/setup.bash
Feb 09 09:59:54 USER-pc systemd[1]: /etc/systemd/system/name.service:7: Executable "ros2" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Can anyone please helpme