diff --git a/talos_bringup/config/joy_teleop.yaml b/talos_bringup/config/joy_teleop.yaml new file mode 100644 index 0000000000000000000000000000000000000000..25e2e6bec15a98c4d327be6fca19a4b5c8fe3fac --- /dev/null +++ b/talos_bringup/config/joy_teleop.yaml @@ -0,0 +1,76 @@ +teleop: + walk: + type: topic + message_type: geometry_msgs/Twist + topic_name: cmd_vel + deadman_buttons: [4] + axis_mappings: + - + axis: 1 + target: linear.x + scale: 0.25 + - + axis: 0 + target: angular.z + scale: 0.25 + - + axis: 2 + target: linear.y + scale: 0.15 + + joy_priority: + type: action + action_name: joy_priority_action + buttons: [0] + + # undocumented poses, with 'back' button + home: + type: action + action_name: play_motion + action_goal: + motion_name: home + buttons: [8, 1] + + hands_walk: + type: action + action_name: play_motion + action_goal: + motion_name: hands_walk + buttons: [8, 2] + + # documented motions, with right upper button and right trigger + # see SDE4 documentation + wave: + type: action + action_name: play_motion + action_goal: + motion_name: wave + buttons: [5, 1] + + bow: + type: action + action_name: play_motion + action_goal: + motion_name: bow + buttons: [5, 0] + + open_arms: + type: action + action_name: play_motion + action_goal: + motion_name: open_arms + buttons: [5, 3] + + shake_hand: + type: action + action_name: play_motion + action_goal: + motion_name: shake_right + buttons: [5, 2] + + point_front_left: + type: action + action_name: play_motion + action_goal: + motion_name: point_front_left + buttons: [7, 0] diff --git a/talos_bringup/config/twist_mux/joystick.yaml b/talos_bringup/config/twist_mux/joystick.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e89cc5d5909d8eb8ad48f2498c5d9ea85a7ae613 --- /dev/null +++ b/talos_bringup/config/twist_mux/joystick.yaml @@ -0,0 +1,10 @@ +turbo: + linear_forward_min : 1.0 + linear_forward_max : 1.0 + linear_backward_min : 1.0 + linear_backward_max : 1.0 + linear_lateral_min : 1.0 + linear_lateral_max : 1.0 + angular_min : 1.0 + angular_max : 1.0 + steps : 1 diff --git a/talos_bringup/config/twist_mux/twist_mux_locks.yaml b/talos_bringup/config/twist_mux/twist_mux_locks.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d09a73e0842e91802851d6f1738e6cffa6ac3a80 --- /dev/null +++ b/talos_bringup/config/twist_mux/twist_mux_locks.yaml @@ -0,0 +1,28 @@ +# Locks to stop the twist mux. +# For each lock: +# - topic : input topic that provides the lock; it must be of type std_msgs::Bool?!!! +# - timeout : == 0.0 -> not used +# > 0.0 -> the lock is supposed to published at a certain frequency in order +# to detect that the publisher is alive; the timeout in seconds allows +# to detect that, and if the publisher dies we will enable the lock +# - priority: priority in the range [0, 255], so all the topics with priority lower than it +# will be stopped/disabled + +locks: +- + name : pause + topic : pause_navigation + timeout : 0.0 + # Same priority as joystick control, so it'll not block it. + priority: 100 +- + name : loop_closure + topic : stop_closing_loop + timeout : 0.0 + priority: 200 +- + name : joystick + topic : joy_priority + timeout : 0.0 + priority: 100 + diff --git a/talos_bringup/config/twist_mux/twist_mux_topics.yaml b/talos_bringup/config/twist_mux/twist_mux_topics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9e3fc28fa60d976dc26de99ec31f59fb46d7ecc8 --- /dev/null +++ b/talos_bringup/config/twist_mux/twist_mux_topics.yaml @@ -0,0 +1,28 @@ +# Input topics handled/muxed by the twist mux. +# For each topic: +# - name : name identifier to select the topic +# - topic : input topic of geometry_msgs::Twist type +# - timeout : timeout in seconds to start discarding old messages, and use 0.0 speed instead +# - priority: priority in the range [0, 255]; the higher the more priority over other topics + +topics: +- + name : navigation + topic : nav_vel + timeout : 0.5 + priority: 10 +- + name : joystick + topic : joy_vel + timeout : 0.5 + priority: 100 +- + name : keyboard + topic : key_vel + timeout : 0.5 + priority: 90 +- + name : tablet + topic : tab_vel + timeout : 0.5 + priority: 100 diff --git a/talos_bringup/launch/joystick_teleop.launch b/talos_bringup/launch/joystick_teleop.launch new file mode 100644 index 0000000000000000000000000000000000000000..49f142cd45496a3969b4a5ad4143df31d84638fd --- /dev/null +++ b/talos_bringup/launch/joystick_teleop.launch @@ -0,0 +1,15 @@ +<launch> + + <arg name="cmd_vel" default="input_joy/cmd_vel" /> + <arg name="teleop_config" default="$(find talos_bringup)/config/joy_teleop.yaml" /> + + <rosparam file="$(arg teleop_config)" command="load" /> + <node pkg="joy_teleop" type="joy_teleop.py" name="joy_teleop"> + <remap from="cmd_vel" to="$(arg cmd_vel)" /> + </node> + + <node pkg="joy" type="joy_node" name="joystick"> + <param name="autorepeat_rate" value="10" /> + </node> + +</launch> diff --git a/talos_bringup/launch/talos_bringup.launch b/talos_bringup/launch/talos_bringup.launch index 5f2fb7a6ab806e6ec38b73668e57924d0f5badd6..b4654e0a35ac640e55e01467b4d691b7d36fe6a5 100644 --- a/talos_bringup/launch/talos_bringup.launch +++ b/talos_bringup/launch/talos_bringup.launch @@ -18,4 +18,10 @@ <arg name="robot" value="$(arg robot)"/> </include> + <!-- Twist mux --> + <include file="$(find talos_bringup)/launch/twist_mux.launch" /> + + <!-- Joystick controller --> + <include file="$(find talos_bringup)/launch/joystick_teleop.launch" /> + </launch> diff --git a/talos_bringup/launch/twist_mux.launch b/talos_bringup/launch/twist_mux.launch new file mode 100644 index 0000000000000000000000000000000000000000..09c3d8afe8eb01df796a3070071c08b0b5bcfa39 --- /dev/null +++ b/talos_bringup/launch/twist_mux.launch @@ -0,0 +1,12 @@ +<launch> + + <include file="$(find twist_mux)/launch/twist_mux.launch"> + <arg name="cmd_vel_out" value="walking_controller/cmd_vel"/> + + <arg name="config_locks" value="$(find reemc_bringup)/config/twist_mux/twist_mux_locks.yaml"/> + <arg name="config_topics" value="$(find reemc_bringup)/config/twist_mux/twist_mux_topics.yaml"/> + + <arg name="config_joy" value="$(find talos_bringup)/config/twist_mux/joystick.yaml"/> + </include> + +</launch> diff --git a/talos_bringup/package.xml b/talos_bringup/package.xml index c68f24b7c4dce45de8874470e1e8ebcaf9be1a6d..d4a6fe3f3eac8b845237700f5847184ab2f2c4c0 100644 --- a/talos_bringup/package.xml +++ b/talos_bringup/package.xml @@ -4,9 +4,9 @@ <version>0.0.2</version> <description>The talos_bringup package</description> - <maintainer email="hilario@todo.todo">hilario</maintainer> + <maintainer email="hilario.tome@pal-robotics.com">Hilario Tome</maintainer> - <license>TODO</license> + <license>Proprietary</license> <buildtool_depend>catkin</buildtool_depend> diff --git a/talos_controller_configuration/package.xml b/talos_controller_configuration/package.xml index 0953b5482c93d1872cb73a2d21cbf0b37373a766..89bbf194fa135b469c475109507581c3140261d6 100644 --- a/talos_controller_configuration/package.xml +++ b/talos_controller_configuration/package.xml @@ -4,9 +4,9 @@ <version>0.0.2</version> <description>The talos_controller_configuration package</description> - <maintainer email="hilario@todo.todo">hilario</maintainer> + <maintainer email="hilario.tome@pal-robotics.com">Hilario Tome</maintainer> - <license>TODO</license> + <license>Proprietary</license> <buildtool_depend>catkin</buildtool_depend> diff --git a/talos_description/package.xml b/talos_description/package.xml index 4c430b2a03ba4678b2d24c11c1eeade495be42a2..20276dac74b8c5126cf748f95c84623b896d4838 100644 --- a/talos_description/package.xml +++ b/talos_description/package.xml @@ -6,7 +6,7 @@ <maintainer email="hilario.tome@pal-robotics.com">Hilario Tomé</maintainer> - <license>TODO</license> + <license>Proprietary</license> <buildtool_depend>catkin</buildtool_depend>