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

Real Robot and Rviz path is not matching

asked 2018-03-08 19:15:12 -0500

smartbot gravatar image

Hi Good morning everyone!! I hope my question/query is not duplicated. If it is, I am really really sorry. I tried checking the answers similiar to my query but I couldn't find it. Any help would be highly appreciated.

I have a customized robot which I am trying to move it autonomously in my workshop. I am using amcl and move-base algorithm. The problem is when I am watching on rviz, its perfectly moving and planning path. But my customized robot is not even moving more than few centimeters.
I am using:

(1) ROS Kinetic (2) Ubuntu 16.04 LTS on Jetson TX2 (3) RP Lidar A1 (4) Arduino UNO for sending motor command via STM32F0-Discorvery board (CAN bus) to RoboteQ motor controller.

I am getting this warning messages

[ WARN] [1520556177.779801584]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.5349 seconds
[ WARN] [1520556178.214556518]: Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.5679 seconds

This is my cmd_vel plot:

https://www.dropbox.com/s/x67lhcx2qf9...

Here are my launch files and configuration files:

(1) navigate.launch

<?xml version="1.0"?>
<launch>

    <master auto="start"/>
    <!-- Run my_robot compatible laser drivers -->
    <include file="$(find autonomous_driving)/launch/laser.launch" />

    <!-- Map server -->
    <arg name="map_file" default="$(find autonomous_driving)/maps/my_workshop.yaml"/>
    <node pkg="map_server" name="map_server"  type="map_server" args="$(arg map_file)" />

    <!-- AMCL used for localization -->
    <include file="$(find autonomous_driving)/launch/amcl.launch" />

    <!-- Calls navigation stack packages for compatible my_robot base -->

    <include file="$(find autonomous_driving)/launch/move_base/move_base.launch" />

    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find autonomous_driving)/rviz/navigation.rviz"/>
</launch>

2) amcl.launch

<?xml version="1.0"?>
<launch>
<node pkg="amcl" type="amcl" name="amcl" output="screen">

  <remap from="scan" to="scan" />
  <remap from="cmd_vel" to="cmd_vel" />

  <remap from="scan" to="/scan" />

  <!-- Publish scans from best pose at a max of 10 Hz -->
  <param name="odom_model_type" value="diff"/>
  <param name="odom_alpha5" value="0.1"/>
  <param name="transform_tolerance" value="0.2" />
  <param name="gui_publish_rate" value="10.0"/>
  <param name="laser_max_beams" value="30"/>
  <param name="min_particles" value="500"/>
  <param name="max_particles" value="5000"/>
  <param name="kld_err" value="0.05"/>
  <param name="kld_z" value="0.99"/>
  <param name="odom_alpha1" value="0.2"/>
  <param name="odom_alpha2" value="0.2"/>
  <!-- translation std dev, m -->
  <param name="odom_alpha3" value="0.8"/>
  <param name="odom_alpha4" value="0.2"/>
  <param name="laser_z_hit" value="0.5"/>
  <param name="laser_z_short" value="0.05"/>
  <param name="laser_z_max" value="0.05"/>
  <param name="laser_z_rand" value="0.5"/>
  <param name="laser_sigma_hit" value="0.2"/>
  <param name="laser_lambda_short" value="0.1"/>
  <param name="laser_lambda_short" value="0.1"/>
  <param name="laser_model_type" value="likelihood_field"/>
  <!-- <param name="laser_model_type" value="beam"/> -->
  <param name="laser_likelihood_max_dist" value="2.0"/>
  <param name="update_min_d" value="0.2"/>
  <param name="update_min_a" value="0.5"/>
  <param name="odom_frame_id" value="odom"/>
  <param name="base_frame_id" value="base_link"/>
  <param name="global_frame_id" value="map"/>
  <param name="resample_interval" value="1"/>
  <param name="transform_tolerance" value="0.1"/>
  <param name="recovery_alpha_slow" value="0.0"/>
  <param name ...
(more)
edit retag flag offensive close merge delete

Comments

maybe you can check your topic first with command rostopic list and check whether your controller has received velocity topic

pengjiawei gravatar image pengjiawei  ( 2018-03-16 01:06:05 -0500 )edit

How can you RVIZ runs correctly, but in the real world it's cannot? The rviz update the robot location using /odom and map relationship, if you robot donot move, the /odom must donot have data. Pls check your odom

l_a_den gravatar image l_a_den  ( 2018-03-16 20:54:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-11 12:51:41 -0500

aarontan gravatar image

I have a similar set up and I used this package

It works well for me.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2018-03-08 19:15:12 -0500

Seen: 635 times

Last updated: Jul 11 '18