Skip to content

Commit

Permalink
convert to ROS2 Foxy
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinDeric committed Sep 27, 2020
1 parent 231ffb3 commit 2f31c27
Show file tree
Hide file tree
Showing 20 changed files with 121 additions and 116 deletions.
15 changes: 5 additions & 10 deletions spot_description/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(spot_description)

find_package(catkin REQUIRED COMPONENTS)
find_package(ament_cmake REQUIRED)

catkin_package()
install(DIRECTORY launch urdf meshes
DESTINATION share/${PROJECT_NAME})

include_directories(
${catkin_INCLUDE_DIRS}
)

install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
ament_package()
10 changes: 7 additions & 3 deletions spot_description/package.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<?xml version="1.0"?>
<package format="2">
<?xml-model href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>spot_description</name>
<version>0.0.0</version>
<version>2.0.0</version>
<description>The spot_description package</description>

<maintainer email="[email protected]">Dave Niewinski</maintainer>

<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>urdf</exec_depend>
<exec_depend>xacro</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>

</package>
23 changes: 0 additions & 23 deletions spot_driver/CMakeLists.txt

This file was deleted.

9 changes: 5 additions & 4 deletions spot_driver/package.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0"?>
<package format="2">
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>spot_driver</name>
<version>0.0.0</version>
<version>2.0.0</version>
<description>The spot_driver package</description>

<maintainer email="[email protected]">Dave Niewinski</maintainer>

<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>spot_msgs</exec_depend>
<exec_depend>std_srvs</exec_depend>
<exec_depend>tf2_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>rospy</exec_depend>

<export>
<build_type>ament_python</build_type>
<rosdoc config="rosdoc.yaml" />
</export>
</package>
Empty file.
36 changes: 36 additions & 0 deletions spot_driver/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

from setuptools import setup

package_name = 'spot_driver'

setup(
name=package_name,
version='2.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
install_requires=['setuptools'],
zip_safe=True,
author='Dave Niewinski',
author_email='[email protected]',
maintainer='Dave Niewinski',
maintainer_email='[email protected]',
keywords=['ROS'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD',
'Programming Language :: Python',
'Topic :: Software Development',
],
description='The spot_driver package',
license='BSD',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'driver = spot_driver.spot_ros.py:main',
],
},
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
70 changes: 30 additions & 40 deletions spot_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,46 +1,36 @@
cmake_minimum_required(VERSION 3.0.2)
cmake_minimum_required(VERSION 3.5)
project(spot_msgs)

find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
sensor_msgs
std_msgs
message_generation
)
find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)

add_message_files(
FILES
BatteryStateArray.msg
BehaviorFault.msg
EStopStateArray.msg
FootStateArray.msg
LeaseArray.msg
LeaseOwner.msg
Metrics.msg
SystemFault.msg
WiFiState.msg
BatteryState.msg
BehaviorFaultState.msg
EStopState.msg
Feedback.msg
FootState.msg
Lease.msg
LeaseResource.msg
PowerState.msg
SystemFaultState.msg
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/BatteryStateArray.msg"
"msg/BehaviorFault.msg"
"msg/EStopStateArray.msg"
"msg/FootStateArray.msg"
"msg/LeaseArray.msg"
"msg/LeaseOwner.msg"
"msg/Metrics.msg"
"msg/SystemFault.msg"
"msg/WiFiState.msg"
"msg/BatteryState.msg"
"msg/BehaviorFaultState.msg"
"msg/EStopState.msg"
"msg/Feedback.msg"
"msg/FootState.msg"
"msg/Lease.msg"
"msg/LeaseResource.msg"
"msg/PowerState.msg"
"msg/SystemFaultState.msg"
DEPENDENCIES builtin_interfaces geometry_msgs std_msgs nav_msgs sensor_msgs
)

generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
ament_export_dependencies(rosidl_default_runtime)

catkin_package(
CATKIN_DEPENDS message_runtime
)

include_directories(
${catkin_INCLUDE_DIRS}
)
ament_package()
4 changes: 2 additions & 2 deletions spot_msgs/msg/BatteryState.msg
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ uint8 STATUS_CHARGING = 2
uint8 STATUS_DISCHARGING = 3
uint8 STATUS_BOOTING = 4

Header header
std_msgs/Header header
string identifier
float64 charge_percentage
duration estimated_runtime
builtin_interfaces/Duration estimated_runtime
float64 current
float64 voltage
float64[] temperatures
Expand Down
2 changes: 1 addition & 1 deletion spot_msgs/msg/BehaviorFault.msg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uint8 STATUS_UNKNOWN = 0
uint8 STATUS_CLEARABLE = 1
uint8 STATUS_UNCLEARABLE = 2

Header header
std_msgs/Header header
uint32 behavior_fault_id
uint8 cause
uint8 status
2 changes: 1 addition & 1 deletion spot_msgs/msg/EStopState.msg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uint8 STATE_UNKNOWN = 0
uint8 STATE_ESTOPPED = 1
uint8 STATE_NOT_ESTOPPED = 2

Header header
std_msgs/Header header
string name
uint8 type
uint8 state
Expand Down
6 changes: 3 additions & 3 deletions spot_msgs/msg/Metrics.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Header header
std_msgs/Header header
float32 distance
int32 gait_cycles
duration time_moving
duration electric_power
builtin_interfaces/Duration time_moving
builtin_interfaces/Duration electric_power
4 changes: 2 additions & 2 deletions spot_msgs/msg/PowerState.msg
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ uint8 STATE_UNKNOWN_SHORE_POWER = 0
uint8 STATE_ON_SHORE_POWER = 1
uint8 STATE_OFF_SHORE_POWER = 2

Header header
std_msgs/Header header
uint8 motor_power_state
uint8 shore_power_state
float64 locomotion_charge_percentage
duration locomotion_estimated_runtime
builtin_interfaces/Duration locomotion_estimated_runtime
4 changes: 2 additions & 2 deletions spot_msgs/msg/SystemFault.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ uint8 SEVERITY_INFO = 1
uint8 SEVERITY_WARN = 2
uint8 SEVERITY_CRITICAL = 3

Header header
std_msgs/Header header
string name
duration duration
builtin_interfaces/Duration duration
int32 code
uint64 uid
string error_message
Expand Down
28 changes: 15 additions & 13 deletions spot_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
<?xml version="1.0"?>
<package format="2">
<?xml-model href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>spot_msgs</name>
<version>0.0.0</version>
<version>2.0.0</version>
<description>The spot_msgs package</description>

<maintainer email="[email protected]">Dave Niewinski</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>nav_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
<depend>rclcpp</depend>
<depend>std_msgs</depend>
<depend>builtin_interfaces</depend>
<depend>rosidl_default_generators</depend>
<depend>geometry_msgs</depend>
<depend>nav_msgs</depend>
<depend>sensor_msgs</depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
14 changes: 5 additions & 9 deletions spot_viz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(spot_viz)

find_package(catkin REQUIRED COMPONENTS)
find_package(ament_cmake REQUIRED)

catkin_package()
install(DIRECTORY launch rviz
DESTINATION share/${PROJECT_NAME})

include_directories(
${catkin_INCLUDE_DIRS}
)

install(DIRECTORY rviz DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
ament_package()
10 changes: 7 additions & 3 deletions spot_viz/package.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<?xml version="1.0"?>
<package format="2">
<?xml-model href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>spot_viz</name>
<version>0.0.0</version>
<version>2.0.0</version>
<description>The spot_viz package</description>

<maintainer email="[email protected]">Dave Niewinski</maintainer>

<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>joint_state_publisher</exec_depend>
<exec_depend>joint_state_publisher_gui</exec_depend>
<exec_depend>rviz</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>

</package>

0 comments on commit 2f31c27

Please sign in to comment.