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

running UWSim commands in ROS

asked 2013-08-28 06:52:01 -0500

NKN gravatar image

updated 2014-04-20 14:09:42 -0500

ngrennan gravatar image

Where can I find a good documentation about the UWSim in ROS. Actually having the source files is not enough and it is actually hard to follow all the functions. for example, how can I use these command correctly :

& rosrun UWSim gotoAbsolutePosition 0 0 0 0 0 0

I know that there is a node 'gotoAbsolutePosition' in the Package 'UWSim' and I knwo the variables, but I cannot set the two topics properly.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2013-08-29 13:05:08 -0500

Mario Prats gravatar image

Hi NKN, unfortunately there is not much documentation about UWSim yet, just what there is on the wiki:

http://www.irs.uji.es/uwsim/wiki/

However, it comes with a set of examples that should be self explanatory, being gotoAbsolutePosition one of them. It requires a nav_msgs/Odometry topic where UWSim is publishing its current pose (via a PATToROSOdom interface), and another nav_msgs/Odometry topic where UWSim is listening for position update messages (via a ROSOdomToPAT interface).

Your scene xml file must include these interfaces and specify the topics, e.g:

<ROSOdomToPAT>
  <topic> /pose_update </topic>
  <vehicleName> your_vehicle_name </vehicleName>
</ROSOdomToPAT>

<PATToROSOdom>
  <topic> /current_pose </topic>
  <vehicleName> your_vehicle_name </vehicleName>
</PATToROSOdom>

Note that the default cirs.xml scene does not include the PATToROSOdom, so you need to add it explicitly if you want to use the gotoAbsolutePosition example.

Then, with UWSim running, you should be able to do:

rosrun UWSim gotoVehiclePose /current_pose /pose_update 10 0 0 0 0 0

Hope that helps!

edit flag offensive delete link more

Comments

1

Just to avoid misleadings, the correct command is gotoAbsolutePosition instead of gotoVehiclePose. So the complete line should be: rosrun UWSim gotoAbsolutePosition /current_pose /pose_update 10 0 0 0 0 0 Anyway answer is perfect.

Javier Perez gravatar image Javier Perez  ( 2013-09-01 21:58:36 -0500 )edit

Hi, I am not able to add this topic to my cirs.xml file. I am new to ROS and this is my first package. Can you tell me if I can edit the cirs.xml file? Also for building it, i used catkin_make command. Is that sufficient?

User_810 gravatar image User_810  ( 2015-02-23 14:34:52 -0500 )edit

Hi, The lines that mario posted as code should be in your config file (by default cirs.xml). You can, and should, edit cirs.xml as this is the scene configuration file. After editing it you will need a catkin_make install in order to move these config files to a place where uwsim is able to findthem

Javier Perez gravatar image Javier Perez  ( 2015-02-24 01:44:22 -0500 )edit

I did catkin_make. But uwsim doesn't recognize the changes I made.

User_810 gravatar image User_810  ( 2015-02-24 11:19:41 -0500 )edit
1

As I said on my previous message you need "catkin_make install" without install you are loading the old xml file which was copied to your shared folder

Javier Perez gravatar image Javier Perez  ( 2015-02-25 02:46:33 -0500 )edit

Yes it worked finally. But I think there is some problem with my cirs.xml file. I tried these changes with shipwreck.xml and everything is working there. I will try to reinstall the file again. Thanks a lot for your replies.

User_810 gravatar image User_810  ( 2015-02-27 14:54:10 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-08-28 06:52:01 -0500

Seen: 543 times

Last updated: Apr 20 '14