Robotics StackExchange | Archived questions

geometry_msgs::Twist and cmd_vel (Linear/Angular)

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/33545/geometry_msgstwist-and-cmd_vel-on-turtlebot/?answer=366239#post-id-366239 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.

Asked by Ashkr on 2020-11-24 05:19:15 UTC

Comments

Answers

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.

Asked by miura on 2020-11-24 09:41:32 UTC

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...

Asked by Ashkr on 2020-11-24 21:25:26 UTC

Please suggest some solution. Thanks.

Asked by Ashkr on 2021-01-07 20:40:06 UTC

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.

Asked by miura on 2021-01-16 05:22:24 UTC