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

get a gazebo topic and publish in a ros topic

asked 2016-10-19 01:37:17 -0600

Colin Hwang gravatar image

Hi, I have created a node in gazebo about logical camera

so when i type gz topic -l in terminal.

there is /gazebo/default/my_p3dx/base_link/logical_camera/models.

and i want to use this values in ros.(When i type rostopic list in terminal, there ins't /gazebo/default/my_p3dx/base_link/logical_camera/models message)

I guess that send from gazebo topic to ros topic, How can i do that?

edit retag flag offensive close merge delete

Comments

Hi @Colin you get a solution to this?

I am trying to do a similar thing with python library named pygazebo with combination of rospy. The straightforward solution is probably writing a gazebo plugin for this purpose.

ArpanHalder gravatar image ArpanHalder  ( 2018-03-21 12:47:12 -0600 )edit

I'm also interested

pring gravatar image pring  ( 2020-04-24 11:25:52 -0600 )edit

Me too, I have the same problem

adel gravatar image adel  ( 2020-08-17 11:06:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-31 10:22:42 -0600

dgerod gravatar image

For my understanding you would like to republish a topic in Gazebo to ROS. If this is what you are trying to do, see this example.

The official way make Gazebo and ROS interact is implementing a Gazebo plugin, there are different types of plugins in Gazebo depending on what you are trying to publish (model, sensor, etc.). However, in case that you have some problems to implement that the other approach could be used. Explanation of how to create a plugin could be see here.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-10-19 01:37:17 -0600

Seen: 2,545 times

Last updated: Oct 31 '20