🦴 Adds Simulator from OpenQuadruped/spot_mini_mini
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<launch>
|
||||
|
||||
<!-- Load joint controller configurations from YAML file to parameter server -->
|
||||
<rosparam file="$(find mini_ros)/config/control.yaml" command="load"/>
|
||||
|
||||
<!-- Load the controllers -->
|
||||
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
|
||||
output="screen" ns="/spot" args="joint_group_position_controller joint_states_controller"/>
|
||||
|
||||
|
||||
<!-- convert joint states to TF transforms for rviz, etc -->
|
||||
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen">
|
||||
<remap from="/joint_states" to="/spot/joint_states" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,11 @@
|
||||
<launch>
|
||||
<!-- Sensor Calibration Node -->
|
||||
<node name="servo_calibration" pkg="mini_ros" type="servo_calibration" output="screen"/>
|
||||
|
||||
<!-- Sensor Interface Node -->
|
||||
<node pkg="rosserial_python" type="serial_node.py" name="serial_node">
|
||||
<param name="port" value="/dev/ttyS0"/> <!-- HW Serial -->
|
||||
<param name="baud" value="500000"/> <!-- must match Teensy -->
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,24 @@
|
||||
<launch>
|
||||
<!-- Load the urdf into the parameter server from the xacro file-->
|
||||
<param name="robot_description" command="xacro '$(find mini_ros)/urdf/spot.urdf.xacro'" />
|
||||
|
||||
<arg name="use_sim_time" default="true"/>
|
||||
<arg name="gui" default="true"/>
|
||||
<arg name="headless" default="false"/>
|
||||
<arg name="debug" default="false"/>
|
||||
|
||||
<!-- We reuse the logic in empty_world.launch, changing only the name of the world to be launched -->
|
||||
<include file="$(find gazebo_ros)/launch/empty_world.launch">
|
||||
<arg name="debug" value="$(arg debug)" />
|
||||
<arg name="gui" value="$(arg gui)" />
|
||||
<arg name="paused" value="true"/>
|
||||
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
|
||||
<arg name="headless" value="$(arg headless)"/>
|
||||
</include>
|
||||
|
||||
<!-- Spawn the urdf -->
|
||||
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -x 0.0 -y 0.0 -z 0.26 -model spot" respawn="false" output="screen"/>
|
||||
|
||||
<include file="$(find mini_ros)/launch/controller.launch"/>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,41 @@
|
||||
<launch>
|
||||
<!-- Minitaur State Machine Node-->
|
||||
<node name="spot_sm" pkg="mini_ros" type="spot_sm" output="screen">
|
||||
<param name="frequency" value="200.0" type="double"/>
|
||||
</node>
|
||||
|
||||
<!-- Joystick Node -->
|
||||
<node respawn="true" pkg="joy"
|
||||
type="joy_node" name="spot_joy" >
|
||||
<param name="dev" type="string" value="/dev/input/js0" />
|
||||
<param name="deadzone" value="0.05" />
|
||||
</node>
|
||||
|
||||
<!-- Teleop Node -->
|
||||
<node name="spot_teleop" pkg="mini_ros" type="teleop_node" output="screen">
|
||||
<param name="frequency" value="200.0" type="double"/>
|
||||
<param name="axis_linear_x" value="4" type="int"/>
|
||||
<param name="axis_linear_y" value="3" type="int"/>
|
||||
<param name="axis_linear_z" value="1" type="int"/>
|
||||
<param name="axis_angular" value="0" type="int"/>
|
||||
<param name="scale_linear" value="1.0" type="double"/>
|
||||
<param name="scale_angular" value="1.0" type="double"/>
|
||||
<param name="button_switch" value="0" type="int"/>
|
||||
<param name="button_estop" value="1" type="int"/>
|
||||
</node>
|
||||
|
||||
<!-- Policy Node -->
|
||||
<node name="spot_pybullet" pkg="mini_ros" type="spot_pybullet_interface" output="screen"/>
|
||||
|
||||
|
||||
<!-- NOTE:
|
||||
Setting Up Joystick:
|
||||
- Get Number (you will see something like jsX): ls /dev/input/
|
||||
- Make available to ROS: sudo chmod a+rw /dev/input/jsX
|
||||
- Make sure <param name="dev" type="string" value="/dev/input/jsX" /> is correct in launch
|
||||
|
||||
You can ignore this msg: [ERROR] [1591631380.406690714]: Couldn't open joystick force feedback!
|
||||
It just means your controller is missing some functionality, but this package doesn't use it.
|
||||
-->
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,60 @@
|
||||
<launch>
|
||||
<!-- Minitaur State Machine Node-->
|
||||
<node name="spot_sm" pkg="mini_ros" type="spot_sm" output="screen">
|
||||
<param name="frequency" value="200.0" type="double"/>
|
||||
</node>
|
||||
|
||||
<!-- Joystick Node -->
|
||||
<node respawn="true" pkg="joy"
|
||||
type="joy_node" name="spot_joy" >
|
||||
<param name="dev" type="string" value="/dev/input/js0" />
|
||||
<param name="deadzone" value="0.005" />
|
||||
</node>
|
||||
|
||||
<!-- Teleop Node -->
|
||||
<node name="spot_teleop" pkg="mini_ros" type="teleop_node" output="screen">
|
||||
<param name="frequency" value="200.0" type="double"/>
|
||||
<param name="axis_linear_x" value="4" type="int"/>
|
||||
<param name="axis_linear_y" value="3" type="int"/>
|
||||
<param name="axis_linear_z" value="1" type="int"/>
|
||||
<param name="axis_angular" value="0" type="int"/>
|
||||
<param name="scale_linear" value="1.0" type="double"/>
|
||||
<param name="scale_angular" value="1.0" type="double"/>
|
||||
<param name="button_switch" value="0" type="int"/>
|
||||
<param name="button_estop" value="1" type="int"/>
|
||||
</node>
|
||||
|
||||
<!-- Policy Node -->
|
||||
<arg name="agent_num" default="0" doc="Agent Number for ARS (GMBC) Policy. Default (0) Loads no Agent. Policy numbers start at 9 and increase by 10. E.G: 9...19...29..."/>
|
||||
<param name="agent_num" value="$(eval arg('agent_num'))" />
|
||||
|
||||
<!-- Spot Params -->
|
||||
<rosparam command="load" file="$(find mini_ros)/config/spot_params.yaml" />
|
||||
|
||||
<!-- Policy Params -->
|
||||
<rosparam command="load" file="$(find mini_ros)/config/policy_params.yaml" />
|
||||
|
||||
<!-- Joystick Params -->
|
||||
<rosparam command="load" file="$(find mini_ros)/config/joy_params.yaml" />
|
||||
|
||||
<!-- the above is equivalent to $(eval agent_num) but I left it in to acknowledge that both options exist -->
|
||||
<node name="spot_real" pkg="mini_ros" type="spot_real_interface" output="screen"/>
|
||||
|
||||
<!-- Sensor Interface Node -->
|
||||
<node pkg="rosserial_python" type="serial_node.py" name="serial_node">
|
||||
<param name="port" value="/dev/ttyS0"/> <!-- HW Serial -->
|
||||
<param name="baud" value="500000"/> <!-- must match Teensy -->
|
||||
</node>
|
||||
|
||||
|
||||
<!-- NOTE:
|
||||
Setting Up Joystick:
|
||||
- Get Number (you will see something like jsX): ls /dev/input/
|
||||
- Make available to ROS: sudo chmod a+rw /dev/input/jsX
|
||||
- Make sure <param name="dev" type="string" value="/dev/input/jsX" /> is correct in launch
|
||||
|
||||
You can ignore this msg: [ERROR] [1591631380.406690714]: Couldn't open joystick force feedback!
|
||||
It just means your controller is missing some functionality, but this package doesn't use it.
|
||||
-->
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,21 @@
|
||||
<launch>
|
||||
<!-- This launchfile loads a differential drive robot into RViz, whose parameters are set
|
||||
and can be modified in diff_params.yaml -->
|
||||
|
||||
<!-- load the urdf into the parameter server from the xacro file-->
|
||||
<param name="robot_description" command="xacro '$(find mini_ros)/urdf/spot.urdf.xacro'" />
|
||||
|
||||
<!-- The robot_state_publisher reads the urdf from /robot_description parameter
|
||||
and listens to joint information on the /joint_states topic -->
|
||||
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
|
||||
|
||||
<!-- The joint state publisher will be launched with a gui, read the urdf from /robot_description
|
||||
and publish the joint values on /joint_states. Optional launch using use_jsp_gui:=1 -->
|
||||
<arg name="use_jsp_gui" default="True" doc="Launch the joint_state_publisher gui to publish joint angles"/>
|
||||
<node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/>
|
||||
<!-- <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/> -->
|
||||
|
||||
<!-- rviz will enable us to see the robot. REQUIRED NODE - All other nodes terminate when RViz closes -->
|
||||
<node name="rviz" pkg="rviz" type="rviz" required="True" args="-d $(find mini_ros)/rviz/spot.rviz"/>
|
||||
|
||||
</launch>
|
||||
Reference in New Issue
Block a user