Robotics StackExchange | Archived questions

problem while building map

hi

i am trying to build map , but when i move the robot in real life some it's take some time to realize where it is position what i need is when i teleop to the robot to move forward the robot model or the axis in the map move forward not after some time realize i order it to move forward.

information: i am using indigo and odoemtery is published in good shape i use arduino mega to connect motor and encoder and imu and every thing publishing correctly i calibriate the imu to publish when the robot don't move it's publish gyro 0 and xand y accel 0 and z 16520 . and when i publish the encoder data i use the following equation :

rpm_act1 = double((count1-countAnt1)601000)/double(time1000/386.8);

rpm_act2 = double((count2-countAnt2)601000)/double(time1000/386.8);

countAnt1 = count1;

countAnt2 = count2;

Encoder resolution: 1000 state changes per 3 wheel rotations.thats why time *1000/3 and gear ratio is 86.8:1

and i subscribe to this data using bascontroller node in this package with some modification. https://github.com/sungjik/mypersonalroboticcompanion/blob/master/mypersonalroboticcompanion/src/basecontroller.cpp

and there is the odometery data when i move forward

frame_id: /odom

childframeid: /base_footprint

pose:

pose:

position: 

  x: 0.00118784888106

  y: -0.000174585926668

  z: 0.0

orientation: 

  x: 0.0

  y: 0.0

  z: -0.187005357211

  w: 0.982358893875

covariance: [1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-09]

twist:

twist:

linear: 

  x: 0.0

  y: 0.0

  z: 0.0

angular: 

  x: 0.0

  y: 0.0

  z: 0.0

covariance: [1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,

1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-09]

header:

seq: 348

stamp:

secs: 1466690997

nsecs: 215294884

frame_id: /odom

childframeid: /base_footprint

pose:

pose:

position: 

  x: 0.00118784888106

  y: -0.000174585926668

  z: 0.0

orientation: 

  x: 0.0

  y: 0.0

  z: -0.187005357211

  w: 0.982358893875

covariance: [1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-09]

twist:

twist:

linear: 

  x: 0.0

  y: 0.0

  z: 0.0

angular: 

  x: 0.0

  y: 0.0

  z: 0.0

covariance: [1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 1e-09, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0,

and the tf tree is correct no problem occur at all this is the tf tree image description

and i don't know what is the problem or what i am doing wrong exactly the launch i use is robotconfig and slam from the smae package : https://github.com/sungjik/mypersonalroboticcompanion/tree/master/mypersonalrobotic_companion/launch

the robot is diff drive robot.

some time i git this msg not always:

Scan Matching Failed, using odometry. Likelihood=-1911.47 lp:-0.166729 -0.0336724 0.30844 op:-0.169527 -0.0232881 0.245829 ^C[slamgmapping-3] killing on exit [robotstatepublisher-2] killing on exit [jointstate_publisher-1] killing on exit Scan Matching Failed, using odometry. Likelihood=-1635.14 lp:-0.166729 -0.0336724 0.30844 op:-0.169527 -0.0232881 0.245829

this what i got form slam.launch when i move robot forward

[ INFO] [1466694674.841141506]: Initialization complete

update frame 0

update ld=0 ad=0

Laser Pose= -0.17 0.02 -0.00663924

m_count 0

Registering First Scan

update frame 195

update ld=0.0731232 ad=0.427248

Laser Pose= -0.14643 0.0886457 -0.433888

m_count 1

Average Scan Matching Score=430.999

neff= 80

Registering Scans:Done

update frame 412

update ld=0.071127 ad=0.415247

Laser Pose= -0.1535 0.0739936 -0.339083

m_count 2

Average Scan Matching Score=143.719

neff= 79.2286

Registering Scans:Done

update frame 596

update ld=0.0757919 ad=0.442028

Laser Pose= -0.112707 0.127609 -0.734632

m_count 3

Average Scan Matching Score=407.081

neff= 79.2313

note that when i move robot in real life left and raight it is instantaneously move in the map left or right but just when i move forward or back ward. for information of how i calibrate my imu data it's like this

imumsg.angularvelocity.x = gx / 650;

imumsg.angularvelocity.y = gy / 160;

imu_msg.angular_velocity.z = gz / 470;

//imu_msg.angular_velocity_covariance = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};

imu_msg.linear_acceleration.x = ax/ 480;

imu_msg.linear_acceleration.y = ay/ 180;

imu_msg.linear_acceleration.z = az/ 1.08337;

update1: after i modified the position it's start to move like the robot move in real life but still not to much i need to know what is the problem i am like adding gain to the x position to the robot can move is this problem in slam launch in the parameter in the gmapping or something else if it's the case how i can modify it and make the position in the map is the same in real life i wish any one can help. this what i did to start move

t.transform.translation.x = x_pos*100;

  t.transform.translation.y = y_pos;  

if i increase gain from 100 to 1000 it will move like the in the real life but will late in updating the map . what is the parmater in gmapping that if change will help to solve this issue

this all the information i can provide i hope any one can help me to solve it i am stuck in this problem in 5 day. and thanks for help.

Asked by ghaith on 2016-06-23 09:16:57 UTC

Comments

Answers