Ask Your Question
0

Current map provided with laser scan

asked 2014-09-10 11:46:50 -0600

AliAs gravatar image

updated 2014-09-11 10:23:51 -0600

Hi, I am new in ROS and I want to do a SLAM using gmapping package with "laser scan" and "odometry data". In the first step I just want to see the current map provided with laser scan in fixed location (x = 0, y = 0, theta = 0) in rviz. I have laser scan topic but I don't have a odometry data yet, so I want to make a fake odometry data. For this I think I should publish a TF data with all zeros. I think I should do some thing like this link:

1 <launch>

2 <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 link1_parent link1 100"/>

3 </launch>

Am I in the right path? could you please tell me what should I do in details? or show me some references?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-10 11:57:18 -0600

SaiHV gravatar image

If you're using a laser scanner, using hector_mapping can be easier than gmapping. Launch the mapping program and publish a 0,0,0 static transform between base_link and laser to account for your non existent odometry and you should be set.

<node pkg="tf" type="static_transform_publisher" name="base_to_laser_tf" args="0 0 0 0 0 0 base_link laser 100"/>

Just my two cents.

edit flag offensive delete link more
0

answered 2014-09-11 10:42:22 -0600

AliAs gravatar image

updated 2014-09-11 11:20:40 -0600

Thank you SaiHV. Should I write your piece of code in a launch file? I tried to launch the following launch file but it fail.

faketf.launch:

<launch>

<node pkg="tf" type="static_transform_publisher" name="base_to_laser_tf" args="0 0 0 0 0 0 base_link laser 100"/>

</launch>

and this is the error:

Usage: rosrun PACKAGE EXECUTABLE [ARGS]

rosrun will locate PACKAGE and try to find

an executable named EXECUTABLE in the PACKAGE tree.

If it finds it, it will run it with ARGS.

edit flag offensive delete link more

Comments

Hi, try this.

  1. Download hector_slam fro here. http://wiki.ros.org/hector_slam
  2. Do a roslaunch hector_mapping mapping.launch
  3. Then do a roslaunch faketf.launch from whichever directory you have the faketf.launch
SaiHV gravatar image SaiHV  ( 2014-09-11 11:39:12 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-10 11:46:50 -0600

Seen: 561 times

Last updated: Sep 11 '14