Skip to content

Commit

Permalink
Fix contact sensors on A1, only log data important for dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielChaseButterfield committed Jun 1, 2024
1 parent 9ffd88e commit 258a061
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 45 deletions.
23 changes: 12 additions & 11 deletions quad_simulator/a1_description/sdf_mesh/a1.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,19 @@
<velocity_decay/>
<gravity>1</gravity>
<sensor name='imu_sensor' type='imu'>
<always_on>1</always_on>
<always_on>true</always_on>
<update_rate>1000</update_rate>
<visualize>1</visualize>
<visualize>true</visualize>
<topic>__default_topic__</topic>
<plugin name='imu_plugin' filename='libgazebo_ros_imu_sensor.so'>
<topicName>trunk_imu</topicName>
<topicName>state/imu</topicName>
<bodyName>imu_link</bodyName>
<updateRateHZ>1000.0</updateRateHZ>
<gaussianNoise>0.0</gaussianNoise>
<xyzOffset>0 0 0</xyzOffset>
<rpyOffset>0 0 0</rpyOffset>
<frameName>imu_link</frameName>
<initialOrientationAsReference>false</initialOrientationAsReference>
</plugin>
<pose frame=''>0 0 0 0 -0 0</pose>
</sensor>
Expand Down Expand Up @@ -357,7 +358,7 @@
<izz>9.6e-06</izz>
</inertia>
</inertial>
<collision name='toe2_collision_collision'>
<collision name='toe2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<sphere>
Expand Down Expand Up @@ -396,7 +397,7 @@
<velocity_decay/>
<sensor name='toe2_contact' type='contact'>
<plugin name='toe2_plugin' filename='libgazebo_ros_bumper.so'>
<alwaysOn>1</alwaysOn>
<alwaysOn>true</alwaysOn>
<updateRate>500</updateRate>
<bumperTopicName>gazebo/toe2_contact_state</bumperTopicName>
<frameName>world</frameName>
Expand Down Expand Up @@ -677,7 +678,7 @@
<izz>9.6e-06</izz>
</inertia>
</inertial>
<collision name='toe3_collision_collision'>
<collision name='toe3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<sphere>
Expand Down Expand Up @@ -716,7 +717,7 @@
<velocity_decay/>
<sensor name='toe3_contact' type='contact'>
<plugin name='toe3_plugin' filename='libgazebo_ros_bumper.so'>
<alwaysOn>1</alwaysOn>
<alwaysOn>true</alwaysOn>
<updateRate>500</updateRate>
<bumperTopicName>gazebo/toe3_contact_state</bumperTopicName>
<frameName>world</frameName>
Expand Down Expand Up @@ -997,7 +998,7 @@
<izz>9.6e-06</izz>
</inertia>
</inertial>
<collision name='toe0_collision_collision'>
<collision name='toe0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<sphere>
Expand Down Expand Up @@ -1036,7 +1037,7 @@
<velocity_decay/>
<sensor name='toe0_contact' type='contact'>
<plugin name='toe0_plugin' filename='libgazebo_ros_bumper.so'>
<alwaysOn>1</alwaysOn>
<alwaysOn>true</alwaysOn>
<updateRate>500</updateRate>
<bumperTopicName>gazebo/toe0_contact_state</bumperTopicName>
<frameName>world</frameName>
Expand Down Expand Up @@ -1317,7 +1318,7 @@
<izz>9.6e-06</izz>
</inertia>
</inertial>
<collision name='toe1_collision_collision'>
<collision name='toe1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<sphere>
Expand Down Expand Up @@ -1356,7 +1357,7 @@
<velocity_decay/>
<sensor name='toe1_contact' type='contact'>
<plugin name='toe1_plugin' filename='libgazebo_ros_bumper.so'>
<alwaysOn>1</alwaysOn>
<alwaysOn>true</alwaysOn>
<updateRate>500</updateRate>
<bumperTopicName>gazebo/toe1_contact_state</bumperTopicName>
<frameName>world</frameName>
Expand Down
76 changes: 42 additions & 34 deletions quad_utils/launch/logging.launch
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,50 @@

<!-- Record bag in bag dir, not timestamped -->
<node pkg="rosbag" type="record" name="rosbag_record" args="record -O $(find quad_logger)/bags/$(arg namespace)_$(arg bag_name) --tcpnodelay
/$(arg namespace)/state
/$(arg namespace)/state/imu
/$(arg namespace)/state/trajectory
/$(arg namespace)/state/ground_truth
/$(arg namespace)/state/estimate
/$(arg namespace)/state/grfs
/$(arg namespace)/mocap_node/quad/pose
/$(arg namespace)/global_plan
/$(arg namespace)/local_plan
/$(arg namespace)/control/grfs
/$(arg namespace)/control/joint_command
/$(arg namespace)/control/mode
/$(arg namespace)/foot_plan_continuous
/$(arg namespace)/foot_plan_discrete
/$(arg namespace)/body_force/joint_torques
/$(arg namespace)/body_force/toe_forces
/terrain_map" />
/quadruped_dataset_entries" />

<!--
/$(arg namespace)/state
/$(arg namespace)/state/imu
/$(arg namespace)/state/trajectory
/$(arg namespace)/state/ground_truth
/$(arg namespace)/state/estimate
/$(arg namespace)/state/grfs
/$(arg namespace)/mocap_node/quad/pose
/$(arg namespace)/global_plan
/$(arg namespace)/local_plan
/$(arg namespace)/control/grfs
/$(arg namespace)/control/joint_command
/$(arg namespace)/control/mode
/$(arg namespace)/foot_plan_continuous
/$(arg namespace)/foot_plan_discrete
/$(arg namespace)/body_force/joint_torques
/$(arg namespace)/body_force/toe_forces
/terrain_map
-->

<!-- Record timestamped bag in bag dir -->
<node pkg="rosbag" type="record" name="rosbag_record_archive" args="record -o $(find quad_logger)/bags/archive/$(arg namespace)_$(arg bag_name) --tcpnodelay
/$(arg namespace)/state/joints
/$(arg namespace)/state/imu
/$(arg namespace)/state/trajectory
/$(arg namespace)/state/ground_truth
/$(arg namespace)/state/estimate
/$(arg namespace)/state/grfs
/$(arg namespace)/mocap_node/quad/pose
/$(arg namespace)/global_plan
/$(arg namespace)/local_plan
/$(arg namespace)/control/grfs
/$(arg namespace)/control/joint_command
/$(arg namespace)/control/mode
/$(arg namespace)/foot_plan_continuous
/$(arg namespace)/foot_plan_discrete
/$(arg namespace)/body_force/joint_torques
/$(arg namespace)/body_force/toe_forces
/terrain_map" />
/quadruped_dataset_entries" />

<!--
/$(arg namespace)/state/joints
/$(arg namespace)/state/imu
/$(arg namespace)/state/trajectory
/$(arg namespace)/state/ground_truth
/$(arg namespace)/state/estimate
/$(arg namespace)/state/grfs
/$(arg namespace)/mocap_node/quad/pose
/$(arg namespace)/global_plan
/$(arg namespace)/local_plan
/$(arg namespace)/control/grfs
/$(arg namespace)/control/joint_command
/$(arg namespace)/control/mode
/$(arg namespace)/foot_plan_continuous
/$(arg namespace)/foot_plan_discrete
/$(arg namespace)/body_force/joint_torques
/$(arg namespace)/body_force/toe_forces
/terrain_map
-->

</launch>

0 comments on commit 258a061

Please sign in to comment.