gazebo-ros2 communication : make an entity in a gazebo sim subscribe to ros2 messages?
Hello, I am trying to implement communication between ros2 and Gazebo: make a simple sphere move in Gazebo, with its velocity coming from ROS2 twist messages. I have the gazebo sim open but the sphere remains stationary even though ros2 messages are being published. This is because the sphere sdf isn't "connected" to the setup. How to "connect" or "plug-in" an sdf to a ros2-ign-bridge system like the one shown below? in other words, how to make an entity in an sdf subscribe to ros2 messages?
the setup:
#terminal A
ros2 run ros_ign_bridge parameter_bridge velo@geometry_msgs/msg/Twist@ignition.msgs.Twist
#terminal B
ign topic -e -t /velo
#terminal C
. /opt/ros/foxy/setup.bash
ros2 topic pub /velo geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}"
#terminal D
ign gazebo sphere.sdf #how to I make THIS subscribe to ros2 messages?