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

Update bringup launch file and URDF to support real Mini Pupper #45

Merged
merged 7 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Note: This step is only for PC
```sh
# Terminal 1
. ~/ros2_ws/install/setup.bash # setup.zsh if you use zsh instead of bash
ros2 launch mini_pupper_bringup bringup.launch.py rviz:=true
ros2 launch mini_pupper_bringup bringup.launch.py joint_hardware_connected:=false rviz:=true

# Terminal 2
ros2 run teleop_twist_keyboard teleop_twist_keyboard
Expand Down Expand Up @@ -124,7 +124,21 @@ ros2 run teleop_twist_keyboard teleop_twist_keyboard

## 2.2 Mini Pupper

(To be prepared)
### 2.1.1 Test walk

Note: This step is only for Mini Pupper

Open 2 terminals and ssh login to Mini Pupper on both.

```sh
# Terminal 1 (ssh)
. ~/ros2_ws/install/setup.bash # setup.zsh if you use zsh instead of bash
ros2 launch mini_pupper_bringup bringup.launch.py

# Terminal 2 (ssh)
ros2 run teleop_twist_keyboard teleop_twist_keyboard
# Then control Mini Pupper with the keyboard
```

## License

Expand All @@ -150,3 +164,19 @@ limitations under the License.
* A. No. Ubuntu 22.04 only for now.
* Q. Is ROS 2 Foxy/Galactic supported?
* A. No. ROS 2 Humble only for now.
* Q. `colcon build` shows `1 package had stderr output: mini_pupper_control`.
Copy link

Choose a reason for hiding this comment

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

I believe it should be fixed by downgrading setuptools: pip3 install setuptools==58.2.0

Copy link
Contributor Author

@Tiryoh Tiryoh Feb 14, 2023

Choose a reason for hiding this comment

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

Thank you for the detailed information!
I would just like to point out that this error (warning) is an issue with the build tool and not with this ROS package.

Copy link
Contributor Author

@Tiryoh Tiryoh Feb 14, 2023

Choose a reason for hiding this comment

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

* A. The following warnings can be safely ignored
```
Starting >>> mini_pupper_description
--- stderr: mini_pupper_control
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
---
Finished <<< mini_pupper_control [7.37s]
```
49 changes: 30 additions & 19 deletions mini_pupper_bringup/launch/bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def generate_launch_description():
rviz_config_path = PathJoinSubstitution(
[description_package, 'rviz', 'urdf_viewer.rviz']
)
servo_interface_launch_path = PathJoinSubstitution(
[FindPackageShare('mini_pupper_control'), 'launch', 'servo_interface.launch.py']
)

robot_name = LaunchConfiguration("robot_name")
sim = LaunchConfiguration("sim")
Expand All @@ -74,13 +77,13 @@ def generate_launch_description():

declare_rviz = DeclareLaunchArgument(
name='rviz',
default_value='true',
default_value='false',
description='Run rviz'
)

declare_hardware_connected = DeclareLaunchArgument(
name='joint_hardware_connected',
default_value='false',
default_value='true',
description='Set to true if connected to a physical robot'
)

Expand All @@ -94,28 +97,36 @@ def generate_launch_description():
)

bringup_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(bringup_launch_path),
launch_arguments={
"use_sim_time": sim,
"robot_name": robot_name,
"gazebo": sim,
"rviz": "false", # set always false to launch RViz2 with costom .rviz file
"joint_hardware_connected": joint_hardware_connected,
"publish_foot_contacts": "true",
"close_loop_odom": "true",
"joint_controller_topic": "joint_group_effort_controller/joint_trajectory",
"joints_map_path": joints_config_path,
"links_map_path": links_config_path,
"gait_config_path": gait_config_path,
"description_path": description_path
}.items(),
)
PythonLaunchDescriptionSource(bringup_launch_path),
launch_arguments={
"use_sim_time": sim,
"robot_name": robot_name,
"gazebo": sim,
"rviz": "false", # set always false to launch RViz2 with costom .rviz file
"joint_hardware_connected": joint_hardware_connected,
"publish_foot_contacts": "true",
"close_loop_odom": "true",
"joint_controller_topic": "joint_group_effort_controller/joint_trajectory",
"joints_map_path": joints_config_path,
"links_map_path": links_config_path,
"gait_config_path": gait_config_path,
"description_path": description_path
}.items(),
)

servo_interface_launch = (
IncludeLaunchDescription(
PythonLaunchDescriptionSource(servo_interface_launch_path),
condition=IfCondition(joint_hardware_connected),
),
)

return LaunchDescription([
declare_robot_name,
declare_sim,
declare_rviz,
declare_hardware_connected,
rviz2_node,
bringup_launch
bringup_launch,
servo_interface_launch
])