Skip to content

Commit

Permalink
revert to 2371510
Browse files Browse the repository at this point in the history
  • Loading branch information
mboulet committed May 9, 2017
1 parent e89e024 commit 7d1e5ca
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 234 deletions.
14 changes: 3 additions & 11 deletions ackermann_cmd_mux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 2.8.3)
project(ackermann_cmd_mux)
find_package(catkin REQUIRED COMPONENTS
roscpp
pluginlib
nodelet
dynamic_reconfigure
ackermann_msgs
std_msgs
rospy
)
find_package(catkin REQUIRED COMPONENTS roscpp pluginlib nodelet dynamic_reconfigure ackermann_msgs)

# pkg-config support
find_package(PkgConfig)
Expand All @@ -24,15 +16,15 @@ generate_dynamic_reconfigure_options(cfg/reload.cfg)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}_nodelet
CATKIN_DEPENDS roscpp pluginlib nodelet dynamic_reconfigure ackermann_msgs rospy std_msgs
CATKIN_DEPENDS roscpp pluginlib nodelet dynamic_reconfigure ackermann_msgs
DEPENDS yaml-cpp
)

include_directories(include ${catkin_INCLUDE_DIRS} ${yaml-cpp_INCLUDE_DIRS})

# Nodelet library
add_library(${PROJECT_NAME}_nodelet src/ackermann_cmd_mux_nodelet.cpp src/ackermann_cmd_subscribers.cpp)
#add_dependencies(${PROJECT_NAME}_nodelet ackermann_msgs)
add_dependencies(${PROJECT_NAME}_nodelet ackermann_msgs_gencpp)
add_dependencies(${PROJECT_NAME}_nodelet ${PROJECT_NAME}_gencfg)

target_link_libraries(${PROJECT_NAME}_nodelet ${catkin_LIBRARIES} ${yaml-cpp_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion ackermann_cmd_mux/launch/ackermann_cmd_mux.launch
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
args="load ackermann_cmd_mux/AckermannCmdMuxNodelet $(arg nodelet_manager_name)">
<param name="yaml_cfg_file" value="$(arg config_file)"/>
</node>
</launch>
</launch>
4 changes: 0 additions & 4 deletions ackermann_cmd_mux/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@
<build_depend>pluginlib</build_depend>
<build_depend>ackermann_msgs</build_depend>
<build_depend>yaml-cpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>

<run_depend>roscpp</run_depend>
<run_depend>ackermann_msgs</run_depend>
<run_depend>pluginlib</run_depend>
<run_depend>nodelet</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>yaml-cpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>

<export>
<nodelet plugin="${prefix}/plugins/nodelets.xml" />
Expand Down
93 changes: 0 additions & 93 deletions ackermann_cmd_mux/src/throttle_interpolator.py

This file was deleted.

2 changes: 1 addition & 1 deletion racecar-vm.rosinstall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- setup-file: {local-name: /opt/ros/kinetic/setup.sh}
- setup-file: {local-name: /opt/ros/indigo/setup.sh}
- git: {local-name: src/racecar, version: master, uri: 'https://github.com/mit-racecar/racecar.git'}
- git: {local-name: src/vesc, version: master, uri: 'https://github.com/mit-racecar/vesc.git'}
- git: {local-name: src/racecar-simulator, version: master, uri: 'https://github.com/mit-racecar/racecar-simulator.git'}
3 changes: 1 addition & 2 deletions racecar.rosinstall
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- setup-file: {local-name: /opt/ros/kinetic/setup.sh}
- setup-file: {local-name: /opt/ros/indigo/setup.sh}
- git: {local-name: src/racecar, version: master, uri: 'https://github.com/mit-racecar/racecar.git'}
- git: {local-name: src/vesc, version: master, uri: 'https://github.com/mit-racecar/vesc.git'}
- git: {local-name: src/zed_wrapper, version: 6c06bb0a3c32aa2dec4a539e296f6ee1d6937518, uri: 'https://github.com/stereolabs/zed-ros-wrapper.git'}
1 change: 1 addition & 0 deletions racecar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ catkin_package(
urg_node
joy
joy_teleop
laser_scan_matcher
rosbag
rostopic
rviz
Expand Down
28 changes: 28 additions & 0 deletions racecar/config/racecar-v1/joy_teleop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
joy_node:
deadzone: 0.01
autorepeat_rate: 20
coalesce_interval: 0.01

teleop:
throttle:
type: topic
message_type: std_msgs/Float64
topic_name: throttle/command
deadman_buttons: [4]
axis_mappings:
-
axis: 1
target: data
scale: 1.0
offset: 0.0
steering:
type: topic
message_type: std_msgs/Float64
topic_name: steering/command
deadman_buttons: [4]
axis_mappings:
-
axis: 3
target: data
scale: 1.0
offset: 0.0
38 changes: 0 additions & 38 deletions racecar/config/racecar-v2/high_level_mux.yaml

This file was deleted.

6 changes: 2 additions & 4 deletions racecar/config/racecar-v2/joy_teleop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ joy_node:
coalesce_interval: 0.01

teleop:
# Manual control is the default mode.
# Holding any button enables autonomous control.
ackermann:
type: topic
message_type: ackermann_msgs/AckermannDriveStamped
topic_name: low_level/ackermann_cmd_mux/input/teleop
deadman_buttons: []
topic_name: ackermann_cmd_mux/input/teleop
deadman_buttons: [4]
axis_mappings:
-
axis: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@
# short_desc: Short description (optional)

subscribers:
- name: "Safety"
topic: "input/safety"
timeout: 0.2
priority: 15
short_desc: "Input for safety monitor, highest priority"
- name: "Teleoperation"
topic: "input/teleop"
timeout: 0.2
priority: 10
short_desc: "Input for human teleoperation (joystick). Highest priority."

- name: "Safety"
topic: "input/safety"
timeout: 0.2
priority: 5
short_desc: "Input for safety monitor."

short_desc: "Input for human teleoperation (joystick)"
- name: "Navigation"
topic: "input/navigation"
timeout: 0.2
priority: 0
priority: 5
short_desc: "Input for autonomous navigation"

- name: "Default"
topic: "input/default"
timeout: 1.0
priority: 0
short_desc: "Default input, lowest priority"
publisher: "output"
21 changes: 6 additions & 15 deletions racecar/config/racecar-v2/vesc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
speed_to_erpm_gain: 4614
speed_to_erpm_offset: 0.0

tachometer_ticks_to_meters_gain: 0.00225
# servo smoother - limits rotation speed and smooths anything above limit
max_servo_speed: 3.2 # radians/second
servo_smoother_rate: 75.0 # messages/sec

# servo smoother - limits acceleration and smooths anything above limit
max_acceleration: 2.5 # meters/second^2
throttle_smoother_rate: 75.0 # messages/sec

# servo value (0 to 1) = steering_angle_to_servo_gain * steering angle (radians) + steering_angle_to_servo_offset
steering_angle_to_servo_gain: -1.2135
steering_angle_to_servo_offset: 0.5304

# publish odom to base link tf
vesc_to_odom/publish_tf: false
vesc_to_odom/publish_tf: true

# car wheelbase is about 25cm
wheelbase: .25
Expand All @@ -27,11 +18,11 @@ vesc_driver:
duty_cycle_min: 0.0
duty_cycle_max: 0.0
current_min: 0.0
current_max: 20.0
brake_min: -20000.0
brake_max: 200000.0
speed_min: -3250
speed_max: 3250
current_max: 0.0
brake_min: 0.0
brake_max: 0.0
speed_min: -4000
speed_max: 6000
position_min: 0.0
position_max: 0.0
servo_min: 0.15
Expand Down
18 changes: 18 additions & 0 deletions racecar/launch/includes/racecar-v1-teleop.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- -*- mode: XML -*- -->
<launch>
<arg name="racecar_version" default="racecar-v1" />
<arg name="run_camera" default="false"/>

<include file="$(find racecar)/launch/includes/common/joy_teleop.launch.xml" >
<arg name="racecar_version" value="$(arg racecar_version)" />
</include>
<include file="$(find racecar)/launch/includes/$(arg racecar_version)/steering.launch.xml" />
<include file="$(find racecar)/launch/includes/$(arg racecar_version)/throttle.launch.xml" />
<include file="$(find racecar)/launch/includes/common/sensors.launch.xml" >
<arg name="racecar_version" value="$(arg racecar_version)" />
</include>
<include file="$(find racecar)/launch/includes/$(arg racecar_version)/sensors.launch.xml">
<arg name="run_camera" value="$(arg run_camera)" />
</include>

</launch>
20 changes: 20 additions & 0 deletions racecar/launch/includes/racecar-v1/sensors.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- -*- mode: XML -*- -->
<launch>
<arg name="run_camera" default="true" />

<!-- camera -->
<group ns="front_camera" if="$(arg run_camera)">
<node pkg="pointgrey_camera_driver" type="camera_node" name="camera_node">
<param name="serial" value="0" />
<param name="camera_info_url" value="" />
<param name="frame_id" value="camera" />
</node>
</group>

<!-- optical flow -->
<node pkg="px4flow" type="px4flow_node" name="optical_flow_node">
<param name="serial_port" value="/dev/px4flow" />
<param name="baudrate" value="115200" />
</node>

</launch>
19 changes: 19 additions & 0 deletions racecar/launch/includes/racecar-v1/static_transforms.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- -*- mode: XML -*- -->
<launch>

<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_imu"
args="0.1 0.0 0.16 0.0 0.0 0.0 1.0 /base_link /base_imu_link" />

<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_px4flow"
args="0.15 0.0 0.16 0.0 0.0 -0.707107 0.707107 /base_link /px4flow" />

<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_laser"
args="0.265 0.0 0.145 0.0 0.0 0.0 1.0 /base_link /laser" />

<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_camera"
args="0.340 0.0 0.120 0.0 0.0 0.0 1.0 /base_link /camera" />

<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_base_footprint"
args="0.0 0.0 0.0 0.0 0.0 0.0 1.0 /base_link /base_footprint" />

</launch>
Loading

0 comments on commit 7d1e5ca

Please sign in to comment.