Positive Rotation of model is not anticlockwise? why?
I am using melodic and ubuntu 18.04 and gazebo-9.
Problem: When I give the command of turning the Yaw (angle around z axis) as a positive value eg (+0.3), the model should rotate anticlockwise (ie towards its left). But it is moving clockwise.
Question: Why, my robot does not rotate anticlockwise, when I give it a positive rotation command?
I downloaded urdf file of a model (two-wheeled robot) from part1 of
this site and added plugin "libgazeborosdiffdrive.so"
My launch file is as follows:
description" command="$(find xacro)/xacro.py '$(find m2wrdescription)/urdf/m2wrwebsite.urdf'" >
<xml version="1.0" encoding="UTF-8"?>
<launch>
<param name="robot
<arg name="x" default="0"/>
<arg name="y" default="0"/>
<arg name="z" default="0.5"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
</include>
<node name="mybot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -param robot_description -model m2wr -x $(arg x) -y $(arg y) -z $(arg z)" />
</launch>
I am setting rotation of the model from this python script, using topic=cmd_vel and creating a publisher node. I tried to give the code of my script here. But I think, my length exceeds, so I am not including it.
Asked by shiraz_baig on 2021-05-28 20:27:05 UTC
Answers
The model defines the right wheel on the left and the left wheel on the right. Swap the sign of the y-position in the wheel joints.
Asked by nlamprian on 2021-06-03 03:45:05 UTC
Comments
Thankyou very much. Now, It works fine.
Asked by shiraz_baig on 2021-06-03 10:52:32 UTC
Comments