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

About geometry_msgs/Twist

asked 2011-11-29 16:44:23 -0500

MichaelHsu170 gravatar image

Are there any instructions about the meaning of geometry_msgs/Twist elements? e.g. What's the unit of linear and angular, m/s? degree/min? degree/s?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2011-11-29 17:04:48 -0500

karthik gravatar image

Hi, These are just msgs in a structured way so that they can be published or subscribed by a node. They are just values. It depends on the node which actually uses them to manipulate robot. It depends on how you want to use it. For example in teleop_base package the teleop_base_keyboard.cpp takes the msgs from keyboard and uses them as m/sec. If your node takes this msgs as mm/sec then the node execution will be accordingly.

You can know the msg types by the following command.

rosmsg show geometry_msgs/Twist

whose output is

geometry_msgs/Vector3 linear
  float64 x
  float64 y
  float64 z
geometry_msgs/Vector3 angular
  float64 x
  float64 y
  float64 z

Hope this helps, Karthik

edit flag offensive delete link more

Comments

Thanks, I'll read sources of p2os package.
MichaelHsu170 gravatar image MichaelHsu170  ( 2011-11-29 17:15:50 -0500 )edit
10

answered 2011-11-29 17:37:01 -0500

updated 2011-11-29 20:36:28 -0500

Note that the units are defined in REP103 on "Standard Units of Measure and Coordinate Conventions" here: http://www.ros.org/reps/rep-0103.html

edit flag offensive delete link more

Comments

It helps, thanks.
MichaelHsu170 gravatar image MichaelHsu170  ( 2011-11-29 23:00:57 -0500 )edit
1

Is there a preferred way to initialise such a variable? Let s say I declar ein my program:

geometry_msgs/Twist datas

can I initialise the vector as:

datas = { 0.0, 0.0, 0.0};

??? I thought it was like e structure's initialisation but it doesn t compile

Andromeda gravatar image Andromeda  ( 2014-08-09 19:22:11 -0500 )edit

Question Tools

Stats

Asked: 2011-11-29 16:44:23 -0500

Seen: 7,723 times

Last updated: Nov 29 '11