Visualizing objects in rviz
Guys, i am completely new to ROS and trying to learn how to get things done. I am trying to model an environment where I have two objects and the pr2 in my world. The launch file is the following:
<launch>
<!-- Launch PR2 in empty world -->
<include file="$(find pr2_gazebo)/pr2_empty_world.launch"/>
<!-- send urdf to param server -->
<param name="object1" textfile="/home/x/ros_workspace/project/objects/urdf/object1.urdf" />
<param name="object2" textfile="/home/ros_workspace/project/objects/urdf/object2.urdf" />
<!-- push urdf to factory and spawn robot in gazebo -->
<node name="spawn_object1" pkg="gazebo" type="spawn_model" args="-urdf -param object1 -x 3.0 -y 3.0 -z 0.1 -model object1" respawn="false" output="screen" />
<node name="spawn_object2" pkg="gazebo" type="spawn_model" args="-urdf -param object2 -x 2.75 -y 3.5 -z 0.25 -model object2" respawn="false" output="screen" />
</launch>
My objects get correctly spanwned and I can visualize them in gazebo, but they do not appear on rviz. How would I see the objects in rviz?
Thanks