Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pepper_gazebo_plugin] add base_footprint2 to use planar move plugin #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions pepper_description/urdf/pepper1.0_generated_urdf/pepper.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -2279,20 +2279,35 @@
</sensor>
</gazebo>
-->
<!-- <gazebo> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove this commented part?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah non, this urdf file should be regenerated from macro, so if we remove this code from macro than it won't be here

<!-- <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller"> -->
<!-- <alwaysOn>true</alwaysOn> -->
<!-- <updateRate>100</updateRate> -->
<!-- <robotNamespace>/</robotNamespace> -->
<!-- <leftJoint>WheelFL</leftJoint> -->
<!-- <rightJoint>WheelFR</rightJoint> -->
<!-- <wheelSeparation>0.170</wheelSeparation> -->
<!-- <wheelDiameter>0.140</wheelDiameter> -->
<!-- <torque>36.9</torque> -->
<!-- <commandTopic>cmd_vel</commandTopic> -->
<!-- <odometryTopic>odom_diffdrive</odometryTopic> -->
<!-- <odometryFrame>odom</odometryFrame> -->
<!-- <robotBaseFrame>base_footprint</robotBaseFrame> -->
<!-- </plugin> -->
<!-- </gazebo> -->
<!-- Planar move plugin -->
<gazebo>
<plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
<alwaysOn>true</alwaysOn>
<updateRate>100</updateRate>
<robotNamespace>/</robotNamespace>
<leftJoint>WheelFL</leftJoint>
<rightJoint>WheelFR</rightJoint>
<wheelSeparation>0.170</wheelSeparation>
<wheelDiameter>0.140</wheelDiameter>
<torque>36.9</torque>
<plugin name="object_controller"
filename="libgazebo_ros_planar_move.so">
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom_diffdrive</odometryTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<odometryRate>20</odometryRate>
<robotBaseFrame>base_footprint</robotBaseFrame>
<recover_roll_velocity_p_gain>1</recover_roll_velocity_p_gain>
<recover_pitch_velocity_p_gain>1</recover_pitch_velocity_p_gain>
<recover_z_velocity_p_gain>1</recover_z_velocity_p_gain>
<joint_state_idel_sec>3.0</joint_state_idel_sec>
</plugin>
</gazebo>
<!-- HEAD -->
Expand Down
38 changes: 27 additions & 11 deletions pepper_description/urdf/pepper1.0_generated_urdf/pepperGazebo.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -684,20 +684,36 @@
</gazebo>
-->
<!-- Drive controller -->
<!-- <gazebo> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove this commented part?

<!-- <plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so"> -->
<!-- <alwaysOn>true</alwaysOn> -->
<!-- <updateRate>100</updateRate> -->
<!-- <robotNamespace>/</robotNamespace> -->
<!-- <leftJoint>WheelFL</leftJoint> -->
<!-- <rightJoint>WheelFR</rightJoint> -->
<!-- <wheelSeparation>0.170</wheelSeparation> -->
<!-- <wheelDiameter>0.140</wheelDiameter> -->
<!-- <torque>36.9</torque> -->
<!-- <commandTopic>cmd_vel</commandTopic> -->
<!-- <odometryTopic>odom_diffdrive</odometryTopic> -->
<!-- <odometryFrame>odom</odometryFrame> -->
<!-- <robotBaseFrame>base_footprint</robotBaseFrame> -->
<!-- </plugin> -->
<!-- </gazebo> -->

<!-- Planar move plugin -->
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<alwaysOn>true</alwaysOn>
<updateRate>100</updateRate>
<robotNamespace>/</robotNamespace>
<leftJoint>WheelFL</leftJoint>
<rightJoint>WheelFR</rightJoint>
<wheelSeparation>0.170</wheelSeparation>
<wheelDiameter>0.140</wheelDiameter>
<torque>36.9</torque>
<plugin name="object_controller"
filename="libgazebo_ros_planar_move.so">
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom_diffdrive</odometryTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<robotBaseFrame>base_footprint</robotBaseFrame>
<odometryRate>20</odometryRate>
<robotBaseFrame>base_footprint2</robotBaseFrame>
<recover_roll_velocity_p_gain>1</recover_roll_velocity_p_gain>
<recover_pitch_velocity_p_gain>1</recover_pitch_velocity_p_gain>
<recover_z_velocity_p_gain>1</recover_z_velocity_p_gain>
<joint_state_idel_sec>3.0</joint_state_idel_sec>
</plugin>
</gazebo>
</robot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,26 @@
</inertial>
<xacro:insert_visu_torso/>
</link>
<link name="base_footprint2">
<visual>
<geometry>
<box size="0.01 0.01 0.01" />
</geometry>
</visual>
<collision>
<geometry>
<box size="1.2 1.2 0.01" />
</geometry>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx="0.0452761" ixy="0" ixz="0.00499091" iyy="0.0432702" iyz="-0.000266886" izz="0.0258881"/>
</inertial>
</link>
<joint name="base_footprint2_fixedjoint" type="fixed">
<parent link="base_link"/>
<child link="base_footprint2"/>
<origin rpy="0 0 0" xyz="0 0 -0.8"/>
<axis xyz="0 0 0"/>
</joint>
</robot>