Ask Your Question
1

gazebo simulation

asked 2012-12-13 22:42:36 -0600

camilla gravatar image

updated 2012-12-14 01:24:11 -0600

Hi!
I want to simulate the navigation of a pioneer p3dx in Gazebo.

I can add the robot with:

opt/ros/electric/stacks/p2os/p2os_urdf/launch$ roslaunch pioneer3dx.gazebo.launch

I can control it with the keyboard with:

roslaunch p2os_launch teleop_keyboard.launch

But I'm not able to add the world to the simulation, because when I call:

opt/ros/electric/stacks/simulator_gazebo/gazebo_worlds/launch$ roslaunch office_world.launch

the robot disappear.
Any suggestion?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2012-12-16 22:50:14 -0600

camilla gravatar image

I solved modifing the file pioneer3dx.gazebo.launch

I changed the line:

<include file="$(find gazebo_worlds)/launch/empty_world.launch"/>

with the line:

<include file="$(find gazebo_worlds)/launch/office_world.launch"/>

And now I can move the pioneer in the simulated office world

edit flag offensive delete link more

Comments

1

You should not change files that are installed by system packages since they will be overwritten on updates. Instead, copy the launch file into your own ROS package where you can modify it safely.

Lorenz gravatar imageLorenz ( 2012-12-16 22:55:51 -0600 )edit

Thank you Lorenz, I didn't specify it but I usually copy the files in my workspace and then change them.

camilla gravatar imagecamilla ( 2012-12-17 01:24:23 -0600 )edit
0

answered 2012-12-14 04:11:14 -0600

davinci gravatar image

First start the office_world and then the pioneer.

edit flag offensive delete link more

Comments

Hi Davinci!I tried to do what you suggested, but it doesn't work. When I launch the pioneer the office_world disappear and I get this message:[gazebo-1] process has died [pid 3974, exit code -15]. log files: /home/camilla/.ros/log/6d03e15c-482f-11e2-9b01-000fb0a0b12e/gazebo-1*.log

camilla gravatar imagecamilla ( 2012-12-16 21:55:56 -0600 )edit
0

answered 2012-12-17 00:08:32 -0600

Erwan R. gravatar image

Hello.

What probably happen is that when you spawn the world, there is a physical interaction between the environment and the robot (i.e. the robot is at (0,0,0) and a wall also). This produces a very strong force that throw the robot away (usually in the sky).

Is the robot still appearing in the models' list (left) ? If yes, try spawning your objects in a way the robot and the environment are not at the same place (using -x -y -z arguments).

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-12-13 22:42:36 -0600

Seen: 897 times

Last updated: Dec 17 '12