Parameterizing elements of an SDF model
I'm new to Gazebo and I've been trying to create a SDF model for a general wall I'll be using in a Vicon space. I'm using aau gazebo vicon to modify the pose of my wall model, but, because I have eight walls, I need to figure out how to parameterize the ros topic they listen to.
Specifically, the code I'm trying to modify is:
<plugin name="ros_transform" filename="/home/cohrint/catkin_ws/devel/lib/libros_transform.so">
<targetLink>wall</targetLink>
<transformTopic>/vicon/Wall1/Wall1</transformTopic>
</plugin>
How can I change <transformTopic>/vicon/Wall1/Wall1</transformTopic>
to <transformTopic>/vicon/Wall(n)/Wall(n)</transformTopic>
where (n)
is the nth wall loaded into gazebo?
Asked by nckswt on 2014-10-16 14:47:01 UTC
Answers
I have recently been using embedded ruby (erb) to parameterize sdf models. Here's an example of a parameterized vehicle model using erb. For that example I use erb model.rsdf > model.sdf
to generate the model.sdf file.
Asked by scpeters on 2014-10-19 04:05:55 UTC
Comments
Hmm, that won't quite work for me. I'd rather not have a different model for each wall, I was hoping to simply have one model that reads from a ROS Topic based on, say, the object name or the order in which the object was created.
Asked by nckswt on 2014-10-20 15:55:18 UTC
Comments