ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to create a simple dynamic (moving) environment in gazebo simulation

asked 2020-03-28 15:06:49 -0500

Naza karim gravatar image

updated 2020-03-28 15:07:20 -0500

Hi

I have created this simple model which contains red boxes in my gazebo simulation (sdf model file created by drag and drop):

https://ibb.co/7yKRZV3

My drones detect and cover these static boxes successfully.

I would like to rather have a dynamic environment where these boxes move while the simulation is running. How can I create such a movement? Or any other way to have any kind of moving surrounding?

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-03-29 02:07:27 -0500

There’s actually a gazebo tutorial for adding dynamics to objects: http://gazebosim.org/tutorials?tut=an...

Essentially in the plugin you can specify alot of what’s going on (pose, velocity, color, etc).

edit flag offensive delete link more

Comments

Thank you for your answer @stevemacenski. I have tried something similar from a gazebo tutorial that uses actor but it didn't work, I read that actors are not supported in some versions of gazebo.

I also tried this, it is not working with me for some reason I don't understand. I get the following error:

gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed.
Naza karim gravatar image Naza karim  ( 2020-03-31 08:24:57 -0500 )edit

Actor only supports GAZEBO 8.0+

zhefan gravatar image zhefan  ( 2020-07-04 22:49:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-28 15:06:49 -0500

Seen: 2,379 times

Last updated: Mar 29 '20