How to publish message with several type in yaml syntax
Hi, I'm currently learning to use ROS with Gazebo and I'm working on a drone project. I'm struggling to send the right terminal command to publish a message on a particular topic.
I use ROS-Melodic on a 18.04 Ubuntu LTS version.
Here is the structure of the message:
string[] name
geometry_msgs/Pose[] pose
geometry_msgs/Point[] position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion[] orientation
float64 x
float64 y
float64 z
float64 w
geometry_msgs/Twist[] twist
geometry_msgs/Vector3[] linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3[] angular
float64 x
float64 y
float64 z
I'm trying to simply publish a message on the appropriate topic using the yaml syntax but I can't make it properly.
Here is one of the multiple trial I made:
rostopic pub /gazebo/model_states gazebo_msgs/ModelStates -- '[state1]' '[[10.0,10.0,10.0],[0.0,0.0,0.0,1.0]' '[1.0,1.0,0.0,0.0,0.0,0.0]'
I want to precise that my problem is really about the syntax and how I should write this command to publish on the topic named "gazebo/model_states" with a type message defined as "ModelStates" and described above.
I also tried the dictonnary syntax but it seems it can't work with Vector3 type as it tells me "twist must be a tuple or a list instead of: dict".
Thank you for your help.