Gazebo | Ignition | Community
Ask Your Question

Set pose of model programmatically with higher frequency (using ign transport)

asked 2022-06-22 09:02:34 -0500

marc-marc gravatar image

I was able to spawn models in the gazebo scene by using terminal commands. See my last post:

I wanted to simulate moving items on a conveyor belt. In order for this to work I spawn all the items. Then I want to update the position of the items programmatically. This works by using the /set_pose service in the terminal. See my comment in the following github issue

However, calling terminal commands in a loop is really slow and the simulation runs with a 1% real time factor.

image description

I also found this python library to interact with the ignition transport C++ library but without success so far.

Does anyone have an idea on how to run these position updates with a higher frequency (e.g. 30Hz or more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-06-23 04:00:24 -0500

marc-marc gravatar image

Edit: I found that there is a thing called Actors which can be animated but don't collide with the environment.

However, the path is predefined and cannot be changed during runtime.

image description

edit flag offensive delete link more


I don't think animation would collide with anything. I don't know how to increase the Hz :(

Question, why don't you use ros2 bridge to control the object? ROS2 uses python3

kakcalu13 gravatar imagekakcalu13 ( 2022-06-23 08:03:00 -0500 )edit

Good idea! I will try to bridge the topic /set_pose from ROS2 to ign and then send a message.

marc-marc gravatar imagemarc-marc ( 2022-06-23 09:12:05 -0500 )edit

I think /set_pose is just like you grab the object and move it manually on GUI. If you want the robot to move itself, use the ros2 bridge. I've been using Foxy and it worked well. Soon I will hop into Humble Hawksbill for Citadel, Fortress and Garden

kakcalu13 gravatar imagekakcalu13 ( 2022-06-23 11:38:37 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2022-06-22 09:02:34 -0500

Seen: 20 times

Last updated: Jun 23