Skip to content

Commit 0bc8264

Browse files
committed
Adding x2 files.
1 parent f1fe91a commit 0bc8264

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+32213
-0
lines changed

x2_control/CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(x2_control)
3+
4+
find_package(catkin REQUIRED COMPONENTS roslaunch)
5+
6+
catkin_package()
7+
8+
roslaunch_add_file_check(launch/control.launch)
9+
roslaunch_add_file_check(launch/teleop.launch)
10+
11+
install(DIRECTORY config launch
12+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
13+
)

x2_control/config/control.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
x2_joint_publisher:
2+
type: "joint_state_controller/JointStateController"
3+
publish_rate: 50
4+
5+
x2_velocity_controller:
6+
type: "diff_drive_controller/DiffDriveController"
7+
left_wheel: ['front_left_wheel', 'rear_left_wheel']
8+
right_wheel: ['front_right_wheel', 'rear_right_wheel']
9+
publish_rate: 50
10+
pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 0.03]
11+
twist_covariance_diagonal: [0.001, 0.001, 0.001, 1000000.0, 1000000.0, 0.03]
12+
cmd_vel_timeout: 0.25
13+
14+
k_l: 0.1
15+
k_r: 0.1
16+
17+
# Odometry fused with IMU is published by robot_localization, so
18+
# no need to publish a TF based on encoders alone.
19+
enable_odom_tf: false
20+
21+
# Wheel separation and radius multipliers
22+
wheel_separation_multiplier: 1.5 # default: 1.0
23+
wheel_radius_multiplier : 1.0 # default: 1.0
24+
25+
# Velocity and acceleration limits
26+
# Whenever a min_* is unspecified, default to -max_*
27+
linear:
28+
x:
29+
has_velocity_limits : true
30+
max_velocity : 2.0 # m/s
31+
has_acceleration_limits: true
32+
max_acceleration : 20.0 # m/s^2
33+
angular:
34+
z:
35+
has_velocity_limits : true
36+
max_velocity : 4.0 # rad/s
37+
has_acceleration_limits: true
38+
max_acceleration : 25.0 # rad/s^2
39+
40+
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#Configuation for robot odometry EKF
2+
#
3+
frequency: 50
4+
5+
odom0: /x2_velocity_controller/odom
6+
odom0_config: [false, false, false,
7+
false, false, false,
8+
true, true, true,
9+
false, false, true,
10+
false, false, false]
11+
odom0_differential: false
12+
13+
imu0: /imu/data
14+
imu0_config: [false, false, false,
15+
true, true, true,
16+
false, false, false,
17+
true, true, true,
18+
false, false, false]
19+
imu0_differential: false
20+
21+
odom_frame: odom
22+
base_link_frame: base_link
23+
world_frame: odom

x2_control/config/teleop.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Teleop configuration for PS3 Navigation joystick.
2+
teleop_twist_joy:
3+
axis_linear: 1
4+
scale_linear: 0.4
5+
scale_linear_turbo: 2.0
6+
axis_angular: 0
7+
scale_angular: 1.4
8+
enable_button: 8
9+
enable_turbo_button: 10
10+
joy_node:
11+
deadzone: 0.1
12+
autorepeat_rate: 20

x2_control/config/teleop_ps4.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Teleop configuration for PS4 joystick using the x-pad configuration.
2+
teleop_twist_joy:
3+
axis_linear: 1
4+
scale_linear: 0.4
5+
scale_linear_turbo: 2.0
6+
axis_angular: 0
7+
scale_angular: 1.4
8+
enable_button: 4
9+
enable_turbo_button: 5
10+
joy_node:
11+
deadzone: 0.1
12+
autorepeat_rate: 20
13+
dev: /dev/input/ds4x

x2_control/config/twist_mux.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
topics:
2+
- name : joy
3+
topic : joy_teleop/cmd_vel
4+
timeout : 0.5
5+
priority: 10
6+
- name : bt_joy
7+
topic : bluetooth_teleop/cmd_vel
8+
timeout : 0.5
9+
priority: 9
10+
- name : interactive_marker
11+
topic : twist_marker_server/cmd_vel
12+
timeout : 0.5
13+
priority: 8
14+
- name : external
15+
topic : cmd_vel
16+
timeout : 0.5
17+
priority: 1
18+
locks:
19+
- name : e_stop
20+
topic : e_stop
21+
timeout : 0.0
22+
priority: 255

x2_control/launch/control.launch

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<launch>
2+
<rosparam command="load" file="$(find x2_control)/config/control.yaml" />
3+
4+
<node name="controller_spawner" pkg="controller_manager" type="spawner"
5+
args="x2_joint_publisher x2_velocity_controller" />
6+
7+
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
8+
<rosparam command="load" file="$(find x2_control)/config/robot_localization.yaml" />
9+
</node>
10+
11+
<node pkg="twist_mux" type="twist_mux" name="twist_mux">
12+
<rosparam command="load" file="$(find x2_control)/config/twist_mux.yaml" />
13+
<remap from="cmd_vel_out" to="x2_velocity_controller/cmd_vel"/>
14+
</node>
15+
16+
</launch>
17+

x2_control/launch/teleop.launch

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<launch>
2+
<arg name="joy_dev" default="/dev/input/js0" />
3+
<arg name="joystick" default="true" />
4+
5+
<group ns="bluetooth_teleop" if="$(arg joystick)">
6+
7+
<group unless="$(optenv X2_PS3 0)" >
8+
<rosparam command="load" file="$(find x2_control)/config/teleop_ps4.yaml" />
9+
</group>
10+
11+
<group if="$(optenv X2_PS3 0)" >
12+
<rosparam command="load" file="$(find x2_control)/config/teleop.yaml" />
13+
<param name="joy_node/dev" value="$(arg joy_dev)" />
14+
</group>
15+
16+
<node pkg="joy" type="joy_node" name="joy_node" />
17+
18+
<node pkg="teleop_twist_joy" type="teleop_node" name="teleop_twist_joy"/>
19+
</group>
20+
21+
<node pkg="interactive_marker_twist_server" type="marker_server" name="twist_marker_server"/>
22+
</launch>

x2_control/package.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<name>x2_control</name>
4+
<version>0.0.1</version>
5+
<description>Controllers for X2</description>
6+
7+
<license>BSD</license>
8+
9+
<author email="[email protected]">Carlos Aguero</author>
10+
<author email="[email protected]">Mike Purvis</author>
11+
<maintainer email="[email protected]">Carlos Aguero</maintainer>
12+
13+
<buildtool_depend>catkin</buildtool_depend>
14+
<build_depend>roslaunch</build_depend>
15+
<run_depend>controller_manager</run_depend>
16+
<run_depend>interactive_marker_twist_server</run_depend>
17+
<run_depend>diff_drive_controller</run_depend>
18+
<run_depend>joint_state_controller</run_depend>
19+
<run_depend>joy</run_depend>
20+
<run_depend>robot_localization</run_depend>
21+
<run_depend>teleop_twist_joy</run_depend>
22+
<run_depend>topic_tools</run_depend>
23+
<run_depend>twist_mux</run_depend>
24+
25+
<export>
26+
</export>
27+
</package>

x2_description/CMakeLists.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(x2_description)
3+
4+
find_package(catkin REQUIRED COMPONENTS roslaunch)
5+
6+
catkin_package()
7+
8+
roslaunch_add_file_check(launch/description.launch)
9+
10+
install(DIRECTORY meshes launch urdf
11+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
12+
)
13+
14+
install(PROGRAMS scripts/env_run
15+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
16+
)
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<launch>
2+
<arg name="config" default="base" />
3+
4+
<param name="robot_description"
5+
command="$(find x2_description)/scripts/env_run
6+
$(find x2_description)/urdf/configs/$(arg config)
7+
$(find xacro)/xacro $(find x2_description)/urdf/x2.urdf.xacro
8+
--inorder" />
9+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
10+
</launch>
1.8 MB
Binary file not shown.

x2_description/meshes/camera-beam.stl

60 KB
Binary file not shown.
86.4 KB
Binary file not shown.

x2_description/meshes/jackal-base.stl

48.5 KB
Binary file not shown.
8.29 KB
Binary file not shown.
131 KB
Binary file not shown.
11 KB
Binary file not shown.
98.9 KB
Binary file not shown.
10 KB
Binary file not shown.
13.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)