Floating robot moves in rviz, not gazebo ?
I feel I should apologize before I even start this post as I'm sure I've made some wild assumptions - forgive a newbie :)
I've built a real robot based on ROS, but it doesn't do anything sophisticated as yet - one Arduino node just listens for remote control signals, converts and publishes these as Twists on /cmd_vel, and then another Arduino node picks these up and converts them to motor controller signals. The ROS master runs on a raspberry PI. Then winter arrived and I haven't taken it outside since !
So now I want to add SLAM to the mix, and decided to build a simulated version to work on. I wrote the URDF, and tried to get things working in rviz and gazebo. In rviz the robot moves around fine, though it floats above the ground plane. In gazebo, the front wheels gradually swivel around for some reason even when no movement commands are received, and while the main wheels spin in the right directions when commands are sent to /cmd_vel, the robot remains stationary. URDF below .. I don't have enough points to upload the screenshots but hope my description is sufficient..
I've been trying to find out what I'm doing wrong over the last couple of weeks but now I'm running dry ... I'd really appreciate any advice. I'm sure the wheels should touch the ground, so my positioning is wrong., and I suspect I need more parameters in the gazebo part for friction (mu ? mu2 ?).
I'm running Ubuntu 18.04 on the ROS master, and also on the remote rviz/gazebo node (an Nvidia Jetson Nano), gazebo 9.0.0, rviz 1.13.4, ROS melodic.
Thanks for any help !
David
display.launch:
<launch>
<param name="robot_description" textfile="urdf/storm.urdf" />
<include file="$(find gazebo_ros)/launch/empty_world.launch" />
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model storm" />
</launch>
storm.urdf:
<?xml version="1.0"?>
<robot name="myfirst">
<material name="black">
<color rgba="0 0 0 2.0"/>
</material>
<material name="cyan">
<color rgba="0 1.0 1.0 1.0"/>
</material>
<material name="silver">
<color rgba="0.92 0.92 0.92 2.0"/>
</material>
<material name="magenta">
<color rgba="1.00 0 1.0 1.0"/>
</material>
<material name="red">
<color rgba="1.00 0 0.0 2.0"/>
</material>
<!-- the main box - this is the base reference for the robot -->
<link name="base_link">
<visual>
<origin xyz="0 0 1" rpy="0 0 0" />
<geometry>
<box size="2 1 1" />
</geometry>
<material name="cyan"/>
</visual>
<collision>
<origin xyz="0.5 0 0.75" rpy="0 0 0" />
<geometry>
<box size="3 1.75 1.75" />
</geometry>
</collision>
<inertial>
<mass value="50"/>
<inertia ixx="7.5" ixy="0.0 ...