admin管理员组文章数量:1402174
I know I am supposed to ask ROS2 questions on robot stack exchange. I did, no one has answered, and no one gave a working answer in the linux one either.
As the title states I am trying to run two nodes from this systemd file:
[Unit]
Description=Turtlebot4 Auto Power Management
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
Environment="HOME=root"
Environment=ROS_DOMAIN_ID=0
Environment=RCUTILS_LOGGING_USE_STDOUT=1
Environment=RCUTILS_COLORIZED_OUTPUT=1
Environment=RMW_IMPLEMENTATION=rmw_fastrtps_cpp
ExecStart=/bin/bash -c 'cd /home/ubuntu && \
source /opt/ros/humble/setup.bash && \
source /home/ubuntu/ros2_ws/install/local_setup.bash && \
export PYTHONUNBUFFERED=1 && \
exec ros2 launch turtlebot4_auto_power auto_power.launch.py'
# Improve startup reliability
TimeoutStartSec=180s
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
Which launches this:
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription([
Node(
package='turtlebot4_auto_power',
executable='battery_monitor',
name='battery_monitor',
output='screen'
),
Node(
package='turtlebot4_auto_power',
executable='dock_monitor',
name='dock_monitor',
output='screen'
)
])
And in the output from
sudo journalctl -u turtlebot4_auto_power.service -f
the nodes are just constantly waiting to receive messages and for some reason running ros2 node list my two nodes do not appear.
When I run the nodes manually with just ros2 launch, everything works perfectly.
版权声明:本文标题:launch - TurtleBot4 ROS2 Humble Nodes launched via systemd do not appear in ros2 node list - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744344727a2601688.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论