Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions buzzmobile/launch/simulation_test.launch
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"

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

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.

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>
5 changes: 4 additions & 1 deletion buzzmobile/sense/maps_querier/maps_querier.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
import googlemaps
import rospy

import googlemapskey as gmpskey
try:
import googlemapskey as gmpskey
except ImportError as e:
pass

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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
Expand Down
13 changes: 8 additions & 5 deletions buzzmobile/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
# for downloading the packages needed for this project.
from setuptools import setup

TEST_REQUIRES = [
'pytest==3.0.3',
'netifaces==0.10.5',
'pyrostest>=0.1.2',
]

setup(
name='buzzmobile',
version='0.3',
version='0.3.1',
url='https://github.com/gtagency/buzzmobile',
author='gtagency',
license='MIT',
Expand All @@ -18,12 +24,9 @@
'numpy==1.11.2',
'polyline==1.3.1',
'pylint',
'pytest==3.0.3',
'pyyaml==3.12',
'rospkg==1.0.41',
'ds4drv', # requires apt-get install python-dev
'empy==3.3.2', # required to make catkin_make work
'netifaces==0.10.5', # required for testing
'pyrostest>=0.1.2', # required for testing
],
] + TEST_REQUIRES,
)
16 changes: 10 additions & 6 deletions buzzmobile/tests/simulation/test_gazebo_connection.py
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)
2 changes: 1 addition & 1 deletion ci_scripts/simulation
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ source ~/catkin_ws/devel/setup.bash
cd ~/catkin_ws/src/buzzmobile/buzzmobile

# Run unit tests
pytest tests/simulation
python -m pytest tests/simulation

2 changes: 1 addition & 1 deletion ci_scripts/unittest
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ source ~/catkin_ws/devel/setup.bash
cd ~/catkin_ws/src/buzzmobile/buzzmobile

# Run unit tests
pytest tests/unit
python -m pytest tests/unit

2 changes: 1 addition & 1 deletion ci_scripts/update_deps
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ cd ~/catkin_ws/src
rosdep install -y --from-paths ./buzzmobile/buzzmobile --ignore-src --rosdistro=indigo

cd ~/catkin_ws/src/buzzmobile
pip install -e buzzmobile
python -m pip install -e buzzmobile