Open Flamethr0wer opened 2 months ago
First of all, Foxy is EOL for a long time now. Don't expect any support for it.
Can you launch the demos successfully?
Yes, with the demos, the controller_manager is loaded correctly. However, weirdly, when I now launch my package, the output has changed:
[INFO] [launch]: All log files can be found below /home/flamethrower/.ros/log/2024-08-08-09-38-24-156579-robot-5174
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [5177]
[INFO] [gzserver-2]: process started with pid [5179]
[INFO] [gzclient -3]: process started with pid [5181]
[INFO] [spawn_entity.py-4]: process started with pid [5185]
[INFO] [spawner.py-5]: process started with pid [5188]
[INFO] [spawner.py-6]: process started with pid [5198]
[robot_state_publisher-1] Parsing robot urdf xml string.
[robot_state_publisher-1] Link FL_wheel had 0 children
[robot_state_publisher-1] Link FR_wheel had 0 children
[robot_state_publisher-1] Link RL_wheel had 0 children
[robot_state_publisher-1] Link RR_wheel had 0 children
[robot_state_publisher-1] Link chassis had 1 children
[robot_state_publisher-1] Link laser_frame had 0 children
[robot_state_publisher-1] [INFO] [1723102706.394172699] [robot_state_publisher]: got segment FL_wheel
[robot_state_publisher-1] [INFO] [1723102706.394659273] [robot_state_publisher]: got segment FR_wheel
[robot_state_publisher-1] [INFO] [1723102706.394792681] [robot_state_publisher]: got segment RL_wheel
[robot_state_publisher-1] [INFO] [1723102706.394839070] [robot_state_publisher]: got segment RR_wheel
[robot_state_publisher-1] [INFO] [1723102706.394868514] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1723102706.394893144] [robot_state_publisher]: got segment chassis
[robot_state_publisher-1] [INFO] [1723102706.394921070] [robot_state_publisher]: got segment laser_frame
[spawner.py-6] [INFO] [1723102708.230839531] [spawner_joint_broad]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1723102708.277828013] [spawner_diff_cont]: Waiting for /controller_manager services
[spawn_entity.py-4] [INFO] [1723102709.542547948] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1723102709.546275505] [spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-4] [INFO] [1723102709.559492899] [spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-4] [INFO] [1723102709.583245445] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1723102709.597635451] [spawn_entity]: Waiting for service /spawn_entity
[spawner.py-6] [INFO] [1723102710.270663722] [spawner_joint_broad]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1723102710.316892333] [spawner_diff_cont]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1723102712.333093296] [spawner_joint_broad]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1723102712.396987246] [spawner_diff_cont]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1723102714.383951400] [spawner_joint_broad]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1723102714.441106063] [spawner_diff_cont]: Waiting for /controller_manager services
[spawn_entity.py-4] [INFO] [1723102714.891929503] [spawn_entity]: Calling service /spawn_entity
[spawn_entity.py-4] [INFO] [1723102715.962815576] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [robot]
[gzserver-2] [WARN] [1723102716.033858505] [rcl]: Found remap rule '~/out:=scan'. This syntax is deprecated. Use '--ros-args --remap ~/out:=scan' instead.
[gzserver-2] [WARN] [1723102716.081173725] [rcl]: Found remap rule '~/out:=scan'. This syntax is deprecated. Use '--ros-args --remap ~/out:=scan' instead.
[INFO] [spawn_entity.py-4]: process has finished cleanly [pid 5185]
[gzserver-2] [INFO] [1723102716.406152487] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[spawner.py-6] [INFO] [1723102716.430018419] [spawner_joint_broad]: Waiting for /controller_manager services
[gzserver-2] [INFO] [1723102716.435642398] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /
[gzserver-2] [INFO] [1723102716.437482500] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-2] [INFO] [1723102716.438024448] [gazebo_ros2_control]: Loading parameter files /home/flamethrower/robot_ws/install/robot/share/robot/config/my_controllers.yaml
[gzserver-2] [INFO] [1723102716.473346392] [gazebo_ros2_control]: connected to service!! robot_state_publisher
[spawner.py-5] [INFO] [1723102716.488072034] [spawner_diff_cont]: Waiting for /controller_manager services
[spawner.py-6] [ERROR] [1723102718.254364669] [spawner_joint_broad]: Controller manager not available
[spawner.py-5] [ERROR] [1723102718.317288322] [spawner_diff_cont]: Controller manager not available
[ERROR] [spawner.py-6]: process has died [pid 5198, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_broad --ros-args'].
[ERROR] [spawner.py-5]: process has died [pid 5188, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py diff_cont --ros-args'].
Maybe it's because I ran rosdep, although now gazebo_ros2_control seems to die even earlier, before printing the state interfaces. The entity spawner works now, though.
there is no indication that the gazebo plugin dies. The spawners just die because of the timeout, you can increase that with --controller-manager-timeout or even split your launch files for testing and manually spawn the controllers after gazebo is running.
Well that means I got yet another output. After rebooting, I actually get the original output now... Also, launching the demo and then my package doesn't change the output anymore, which is weird. I can't find any major differences between the files, either, just that mine uses the spawner.py instead of commands and that I use split urdf and launch files and include them in a main one...
Does the invalid argument line mean that it's something to do with the .yaml file? Also, how do I change that timeout argument if I'm in a launch file?
Also, how do I change that timeout argument if I'm in a launch file?
Okay, I added more time, but gazebo_ros2_control still crashes. But is this line
[gzserver-2] what(): Invalid argument
the error that's causing the crash?
It was the dot...
update_rate: 30.0
It had to be
update_rate: 30
Although I don't understand why the publish rate in the diff_cont controller accepts decimal places but the one in the controller_manager doesn't. Anyway, I'm happy I managed to solve it.
No, wait, that solved it for me, but Josh Newans' package on GitHub did not have the dot and didn't work before, either... That is weird.
The output is inconsistent between reboots, I'm not sure why gzserver just dies sometimes.
I've followed the Articulated Robotics tutorial on simulated ros2_control. However, when I try to launch my package, this is the output:
My controllers wait for the controller_manager, but gazebo_ros2_control fails to load it. I've tried installing the dependencies, reinstalling the package, downgrading it and using gdb and logs to find more information, but I haven't managed to solve anything. I have a custom robot, but the files are not the issue because using the package at https://github.com/joshnewans/articubot_one/tree/0085689ee023baac604268cdf7a9ce85a0ed7bae gives me the exact same error. I have installed
ros-foxy-ros2-control
,ros-foxy-ros2-controllers
,ros-foxy-gazebo-ros2-control
andros-foxy-gazebo-ros-pkgs
and always source robot_ws/install/setup.bash This happens both in ROS2 Foxy and ROS2 Humble. Any help is appreciated.