gazebosim / ros_gz

Integration between ROS (1 and 2) and Gazebo simulation
https://gazebosim.org
Apache License 2.0
211 stars 125 forks source link

I want to run gazebo controllers with harmonic and humble #487

Closed Apurv354 closed 5 months ago

Apurv354 commented 5 months ago

Environment

Description



I don't see the model spawning.

## Steps to reproduce
<!-- Provide steps so we can try to reproduce this issue -->

1. Get the above environment and run - ros2 launch gz_ros2_control_demos cart_example_position.launch.py

## Output
<!-- Provide screenshots, console logs, backtraces, and/or anything that could
be useful to us resolving this issue -->
azeey commented 5 months ago

I assume you meant https://github.com/ros-controls/gz_ros2_control instead of https://github.com/ros-controls/gazebo_ros2_control. I believe the master branch is making use of changes inros_gz that are only available in rolling https://github.com/ros-controls/gz_ros2_control/pull/211, so you'll also need to use the humble branch for gz_ros2_control as well.

Apurv354 commented 5 months ago

I have tried the humble branch, and it gives me the same error that I posted above.

Apurv354 commented 5 months ago

Basically, this is the problem

[ruby $(which gz) sim-1] [INFO] [1706429551.323616584] [controller_manager]: Loading controller 'joint_state_broadcaster'
[ruby $(which gz) sim-1] [ERROR] [1706429551.323757245] [controller_manager]: Loader for controller 'joint_state_broadcaster' (type 'joint_state_broadcaster/JointStateBroadcaster') not found.
[ruby $(which gz) sim-1] [INFO] [1706429551.323796786] [controller_manager]: Available classes:
[ruby $(which gz) sim-1] [INFO] [1706429551.323854688] [controller_manager]:   controller_manager/test_controller
[ruby $(which gz) sim-1] [INFO] [1706429551.323873620] [controller_manager]:   controller_manager/test_controller_failed_init
[ruby $(which gz) sim-1] [INFO] [1706429551.323884612] [controller_manager]:   controller_manager/test_controller_with_interfaces
[ruby $(which gz) sim-1] [INFO] [1706429551.323898151] [controller_manager]:   controller_manager/test_chainable_controller
ahcorde commented 5 months ago

@Apurv354 you need to install the dependency

sudo apt-get install ros-humble-joint-state-broadcaster

or run rosdep