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

Adding Ultrasonics to my robot (Multiple sensors)

asked 2017-01-31 03:07:51 -0600

burf2000 gravatar image

So I have a custom robot that I am using Hector Slam on (Neato Lidar) and I have yaml files that detail its size (but no model of the robot). I can do navigation on the robot as the Hector Slam gives me /odem.

This is amazing and thanks everyone who helped.

Now I want to add some ultrasonics to the robot (3 on the front). Now I understand you can publish under the same topics etc:

How would I tell the robot where the ultrasonics sensors are? (I guess on the file that contains the footprint?)

Are there any complications

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-01-31 03:53:58 -0600

gvdhoorn gravatar image

updated 2017-01-31 03:54:44 -0600

I have [..] no model of the robot

and

How would I tell the robot where the ultrasonics sensors are?

A 'model' is actually one way to indicate to a big part of the infrastructure where various bits and pieces on your robot are, as that would cause (fi) the robot_state_publisher to start broadcasting TF frames. The publications representing the ultrasonic measurements would then include the name of their TF frame in the msg header, which other nodes can then use to transform the measurements into whatever local coordinate system they require.

In ROS, we model robots with URDF.

An alternative to this would be to just publish the TF transforms yourself, without using URDF and the robot_state_publisher. That you could do with the static_transform_publisher and the proper arguments.

I would recommend just modelling your robot with URDF, as it would also allow RViz to visualise all sorts of things. Personally I would not want to work on a ROS robot without at least a URDF.

edit flag offensive delete link more

Comments

So I cant do it in the costmap_common_params.yaml https://github.com/burf2000/ROS_Robot...

burf2000 gravatar image burf2000  ( 2017-01-31 04:12:47 -0600 )edit
1

As far as I know, no.

But really: using ROS but not having a model of your robot is an uncommon situation (in my experience). Any reason to not just model your robot?

gvdhoorn gravatar image gvdhoorn  ( 2017-01-31 04:31:27 -0600 )edit

So I found writing the XML a little confusing, So I have my robot as a model, with wheels etc, but got a little confused adding the sensors, especially Lidar https://github.com/burf2000/ROS_Robot...

burf2000 gravatar image burf2000  ( 2017-01-31 04:50:20 -0600 )edit
1

I would really recommend you do the "urdf step-by-step" tutorials, if you haven't already. As to sensors: if you're not simulating things, the URDF is basically a way to configure their locations, relative to your base_link. You just need a link with ..

gvdhoorn gravatar image gvdhoorn  ( 2017-01-31 04:53:35 -0600 )edit
1

.. the proper pose (ie: as the sensor is mounted on your robot).

"got a little confused" is a bit vague. What is it exactly that you didn't understand?

gvdhoorn gravatar image gvdhoorn  ( 2017-01-31 04:54:02 -0600 )edit

I might be wrong but I did go through the step by step but will relook at it, I think I got confused with how to represent a sensor, my Lidar entry (in the file) never rendered, I then had a load of issues when I put it in RVIZ. I guess I can google for a Ultrasonic example when I get home

burf2000 gravatar image burf2000  ( 2017-01-31 05:35:58 -0600 )edit

I'm not telling you to (re)do the tutorials, just suggesting that if you hadn't, it would be a good start. Looking at your urdf, I see different collision and visual geometry fi for your laser link (a box and a cylinder). That didn't make sense to me, hence my question.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-31 05:41:20 -0600 )edit

Perhaps it would also be good to pick up one of the books that deal with these things. Especially those that work out a complete example would perhaps be nice to read. this one fi has the example code ..

gvdhoorn gravatar image gvdhoorn  ( 2017-01-31 05:42:18 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-01-31 03:07:51 -0600

Seen: 594 times

Last updated: Jan 31 '17