model not moving in Rviz but is moving in Gazebo
Hello,
I am trying to create costume robot. I have been trying to follow this tutorial. www.romin.upm.es/wiki/index.php?title...
I can get the robot up in Gazebo and move it with my controller but I cannnot get it to move in Rviz. My goal is to use the navigation stack to create paths for the robot to follow. (if someone know a way to do this with out Rviz I am all for it) I am controlling it with joystick inputs and have independently controlled wheels(balls).
Thank you for any help. I have spent so many hours on this.
Here is my Xacro description file and launch file.
omnishot.urdf.xacro <robot name="omnishot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Included URDF/XACRO Files -->
<xacro:include filename="$(find omni_shot)/urdf/materials.urdf.xacro" />
<xacro:include filename="$(find omni_shot)/urdf/ball.urdf.xacro" />
<!-- PROPERTY LIST -->
<!--All units in m-kg-s-radians unit system -->
<property name="M_PI" value="3.1415926535897931" />
<!-- Main Body-base -->
<property name="base_size" value=".84" />
<property name="base_height" value="0.66" />
<property name="leg" value="0.3" />
<property name="base_mass" value="300" /> <!-- in kg-->
<property name="M_SCALE" value="1" />
<!--Inertial macros for the box and cylinder. Units are kg*m^2-->
<macro name="box_inertia" params="m x y z">
<inertia ixx="${m*(y*y+z*z)/12}" ixy = "0" ixz = "0"
iyy="${m*(x*x+z*z)/12}" iyz = "0"
izz="${m*(x*x+z*z)/12}" />
</macro>
<!-- BASE-FOOTPRINT -->
<!-- base_footprint is a fictitious link(frame) that is on the ground right below base_link origin -->
<link name="odom">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</visual>
</link>
<gazebo reference="base_footprint">
<turnGravityOff>false</turnGravityOff>
</gazebo>
<joint name="base_footprint_joint" type="fixed">
<origin xyz="0 0 ${ball_radius - base_z_origin_to_ball_origin}" rpy="0 0 0" />
<parent link="odom"/>
<child link="base_link" />
</joint>
<!-- BASE-LINK -->
<!--Actual body/chassis of the robot-->
<link name="base_link">
<inertial>
<mass value="${base_mass}" />
<origin xyz="0 0 0" />
<!--The 3x3 rotational inertia matrix. -->
<box_inertia m="${base_mass}" x="${base_size}" y="${base_size}" z="${base_height}"/>
</inertial>
<visual>
<origin xyz="0 0 .38" rpy="0 0 0" />
<geometry>
<mesh filename="file:///home/nathaniel/Documents/Omnibot/code/catkin_ws/src/omni_shot/models/omniShotFlip.stl" scale="${M_SCALE} ${M_SCALE} ${M_SCALE}"/>
</geometry>
<material name="Yellow" />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="${base_size} ${base_size} ${base_height}"/>
</geometry>
</collision>
</link>
<gazebo reference="base_link">
<material>Gazebo/Yellow</material>
<turnGravityOff>false</turnGravityOff>
</gazebo>
<!-- WHEELs -->
<ball name="m1" parent="base_link" x="0" y="${leg}" move="0"/>
<ball name="m2" parent="base_link" x="${-leg}" y="0" move="1"/>
<ball name="m3" parent="base_link" x="0" y="${-leg}" move="0"/>
<ball name="m4" parent="base_link" x="${leg}" y="0" move="1"/>
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/mybot</robotNamespace>
<robotBaseFrame>base_footprint</robotBaseFrame>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<odometryRate>20.0</odometryRate>
</plugin>
</gazebo>
</robot>
ball.urdf.xacro
<?xml version="1.0"?>
<robot name="ball" xmlns:xacro="http://www ...
Hey ngoldfarb, were you able to solve your problem? I'm facing the same problem at the moment... My robot is moving in gazebo, but it is staying at the initial pose in rviz, so that I am not able to create a map