-
Notifications
You must be signed in to change notification settings - Fork 3
On our way to Simulation Tests #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
0892461
37a326d
9cb2abe
dada397
f3d294e
78f2826
084d878
f73fc78
04ecd0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <launch> | ||
| <arg name="mission_control" default="false"/> | ||
| <arg name="gzclient" default="false" /> | ||
| <arg name="world" default="$(find buzzmobile)/simulation/models/world/straight_road.world"/> | ||
|
|
||
| <group ns="buzzmobile"> | ||
| <include file="$(find buzzmobile)/launch/includes/params.launch"/> | ||
| <include file="$(find buzzmobile)/launch/includes/gps.launch"/> | ||
| <!-- <include file="$(find buzzmobile)/launch/includes/mapping.launch"/> --> | ||
| <include file="$(find buzzmobile)/launch/includes/steering.launch"/> | ||
| <include file="$(find buzzmobile)/launch/includes/lidar.launch"/> | ||
| <include file="$(find buzzmobile)/launch/includes/controller.launch"/> | ||
| <group if="$(arg mission_control)"> | ||
| <include file="$(find buzzmobile)/launch/includes/visualization.launch"/> | ||
| </group> | ||
| <include file="$(find buzzmobile)/launch/includes/sim_interface.launch"/> | ||
| </group> | ||
|
|
||
| <!-- Start gazebo server, load world, optionally start viz client --> | ||
| <node pkg="gazebo_ros" name="gazebo" type="gzserver" | ||
| args="-e ode $(arg world) use_sim_time:=true" | ||
| output="screen"/> | ||
| <group if="$(arg gzclient)"> | ||
| <node pkg="gazebo_ros" name="gazebo_gui" type="gzclient"/> | ||
| </group> | ||
|
|
||
| <!-- Spawn Car --> | ||
| <!-- node pkg="buzzmobile" name="sim_spawn_car" type="sim_spawn_car.sh"/ --> | ||
| <include file="$(find buzzmobile)/launch/includes/sim_spawn_car.launch"/> | ||
| </launch> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,10 @@ | |
| import googlemaps | ||
| import rospy | ||
|
|
||
| import googlemapskey as gmpskey | ||
| try: | ||
| import googlemapskey as gmpskey | ||
| except ImportError as e: | ||
| pass | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you sure we want to fail silently here? Maybe a warning message that says they should init the googlemapskey. If you're ok with that I can push it to this branch.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a "This should be a test and you should be faking gmpskey" warning wouldn't be a terrible thing. |
||
|
|
||
| from datetime import datetime | ||
| from sensor_msgs.msg import NavSatFix | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,21 @@ | ||
| from pyrostest import RosTest, with_launch_file | ||
| from rosgraph_msgs.msg import Clock | ||
| """Simple simulation test to connect to Gazebo.""" | ||
|
|
||
| import time | ||
|
|
||
| from rosgraph_msgs.msg import Clock | ||
|
|
||
| from pyrostest import RosTest, with_launch_file | ||
|
|
||
| class TestGazeboConnection(RosTest): | ||
| """Tests for simulation testing infrastructure.""" | ||
|
|
||
| @with_launch_file('buzzmobile', 'simulation.launch') | ||
| @with_launch_file('buzzmobile', 'simulation_test.launch') | ||
| def test_clock_runs(self): | ||
| """Test that simulation.launch correctly launches gazebo""" | ||
| with self.check_topic('/clock', Clock) as ct: | ||
| assert(ct.message) | ||
| print(ct.message) | ||
| time.sleep(30) | ||
|
|
||
| time.sleep(20) | ||
|
|
||
| with self.check_topic('/clock', Clock, 20) as ct1: | ||
| print(ct1.message) | ||
| assert(ct1.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a bunch of warnings on running this saying "deprecated syntax". can you replicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see those, no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait I'm testing these on kinetic, pushing a reminder to myself to test it on indigo in my VM tomorrow.