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

geometry_msgs::Twist and cmd_vel (Linear/Angular)

asked 2020-11-24 04:19:15 -0600

Ashkr gravatar image

updated 2022-04-30 13:30:55 -0600

lucasw gravatar image

Hi, I am new to ROS. I am working on development of 3 leg (3 motors apart 120 deg)robo and I wish to rotate it axially like on x-axis (same to move forward and rotate CW/CCW on x axis. I refer this https://answers.ros.org/question/3354... I went through the 'Twist message' in form of linear vel and angular vel, initially i can control its motion on x and y axis linear and angular respectively. But since i need to turn it on same axis, i had to modify the angular vel (set to x axis). In this case, it move on a circular trajectory but not axially (to x axis). Please suggest me what and where I need to dig more and understand to make it operational.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-24 08:41:32 -0600

miura gravatar image

I've only handled cmd_vel on a two-wheeled robot, but on two wheels, cmd_vel.linear.x forwards and backwards, and cmd_vel.anguar.z for rotation.

So I think that cmd_vel.linear.x will rotate back and forth, cmd_vel.linear.y will rotate left and right, and cmd_vel.angular.z will rotate.

edit flag offensive delete link more

Comments

Hi @miura, thanks for your prompt reply. well, what i understood from your explanation is that I need to configure cmd_vel.linear.x(fw/rw), cmd_vel.linear.y(left/right), cmd_vel.angular.z(angular rotation). Is that correct? well, I had tested configured cmd_vel.linear.x and cmd_vel.angular.x, which works like.. a) move it to forward and backward (linear.x) b) move it to follow circular trajectory (not on axis but radially) like circle...

Ashkr gravatar image Ashkr  ( 2020-11-24 20:25:26 -0600 )edit

Please suggest some solution. Thanks.

Ashkr gravatar image Ashkr  ( 2021-01-07 19:40:06 -0600 )edit

First, change cmd_vel.linear.x, cmd_vel.linear.y, cmd_vel.linear.z, cmd_vel.angular.x, cmd_vel.angular.y, cmd_vel.angular.z one by one in the positive and negative directions I think we need to sort out what happens when we change At that time, you should keep the data for each of the three legs separately.

If there is no desired movement, cmd_vel alone will not be able to solve the problem. You will need to make some changes to the motor control.

miura gravatar image miura  ( 2021-01-16 04:22:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-11-24 04:19:15 -0600

Seen: 1,200 times

Last updated: Nov 24 '20