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

How to get laser data in gazebo?

asked 2016-10-26 05:40:51 -0600

xeeshan gravatar image

Hi everyone I have created my diff drive robot and also mounted laser on the robot using Hokuyo model. Now I need to move my robot from start position to the goal position. I can't understand how to do this. Please help I am beginner.

Thanks in advance

edit retag flag offensive close merge delete

Comments

How have you specified the start and goal position?

Rachit Khurana gravatar image Rachit Khurana  ( 2016-10-26 15:54:28 -0600 )edit

Try https://www.clearpathrobotics.com/ass... . It is a husky tutorial which proves a nice way to move from start to goal.

Rachit Khurana gravatar image Rachit Khurana  ( 2016-10-26 15:56:13 -0600 )edit

I have already followed this but helps nothing

xeeshan gravatar image xeeshan  ( 2016-10-27 05:29:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-26 14:27:08 -0600

arttp2 gravatar image

Gazebo should automatically publish laser scan data. Use $ rostopic list to find the name of that topic.

The simplest way would be to publish your wheel velocity to /cmd_vel and by trial and error check if you have reached your goal.

If this is very inefficient for you then I would suggest you look at the ROS Navigation stack. Classify your problem according to the tools the stack offers.

edit flag offensive delete link more

Comments

Thanks for answering my questions. This is already working using /cmd_vel and using teleop. Basically I want to move my robot between two fixed points set by me. before this how I can check that my laser is working? It's just showing blue light in the simulator.

xeeshan gravatar image xeeshan  ( 2016-10-27 05:14:59 -0600 )edit

Do you want your robot to move in straight line between start to goal? Probably not.

 $ rostopic list

This command will display the name of the topic where Gazebo is publishing laser scan data. Subscribe it in a node. Use it to guide your robot by giving appropriate /cmd_vel values.

arttp2 gravatar image arttp2  ( 2016-10-27 20:07:04 -0600 )edit

If you are not able to achieve your targets this way, then read this: Navigation

It has a steep learning curve.

arttp2 gravatar image arttp2  ( 2016-10-27 20:07:54 -0600 )edit

I have mounted laser on my diff drive robot using hokuyo model. But I am unable to find the laser scanner node. I have read various forums that suggest me to make URDF of my robot and then use necessary plugins after that I have to set the node in RVIZ. I am confused with RVIZ why should we use that

xeeshan gravatar image xeeshan  ( 2016-10-28 17:01:55 -0600 )edit

after all I am working in gazebo

xeeshan gravatar image xeeshan  ( 2016-10-28 17:02:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-26 05:40:51 -0600

Seen: 2,318 times

Last updated: Oct 26 '16