====== Esempi di messaggi con Husky ====== ===== Ricevere un messaggio ===== [[neurali:husky]] Qui viene applicato quanto spiegato in [[neurali:ros_nodes]] Qui c'è l'elenco dei topic [[neurali:husky topic]]. Prendiamo ad esempio /clock Visualizzabile (è pubblicato) con rostopic echo /clock Due comandi sul tipo di dato e sulla descrizione/dettagli rostopic type /clock rosmsg show rosgraph_msgs/Clock Due risposte rosgraph_msgs/Clock time clock Combinandoli insieme si ottiene lo stesso risultato rostopic type /clock | rosmsg show ---- ===== Pubblicare un messaggio ===== /cmd_vel Tipo di dato rostopic type /cmd_vel geometry_msgs/Twist rostopic type /cmd_vel | rosmsg show geometry_msgs/Vector3 linear float64 x float64 y float64 z geometry_msgs/Vector3 angular float64 x float64 y float64 z Invio singolo (è stato sottoscritto) rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]' Invio a frequenza di 1 Hz rostopic pub /cmd_vel geometry_msgs/Twist -r 1 -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]' ----