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

Feature/humble devel #6

Open
wants to merge 5 commits into
base: noetic-devel
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
70 changes: 61 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ cd ..

# Dowload required packages for SOBIT EDU
ros_packages=(
"sobits_common" \
"sobits_msgs" \
"urg_node" \
"azure_kinect_ros_driver" \
"turtlebot2_on_noetic"
"dynamixel_hardware" \
"realsense_ros"
)

# Clone all packages
#Clone all packages
for ((i = 0; i < ${#ros_packages[@]}; i++)) {
echo "Clonning: ${ros_packages[i]}"
git clone https://github.com/TeamSOBITS/${ros_packages[i]}.git
git clone -b $ROS_DISTRO-devel https://github.com/TeamSOBITS/${ros_packages[i]}.git

# Check if install.sh exists in each package
if [ -f ${ros_packages[i]}/install.sh ]; then
Expand All @@ -32,12 +30,23 @@ for ((i = 0; i < ${#ros_packages[@]}; i++)) {

# Setup Turtlebot2 (Kobuki) for ROS Noetic
cd ${DIR}
bash ../turtlebot2_on_noetic/turtlebot/setup_kobuki.sh
# bash ../turtlebot2_on_noetic/turtlebot/setup_kobuki.sh

# Download required dependencies
python3 -m pip install \
transforms3d


# Download ROS packages
sudo apt-get update
sudo apt-get install -y \
ros-$ROS_DISTRO-pybind11-catkin \
ros-$ROS_DISTRO-ecl-linear-algebra \
ros-$ROS_DISTRO-kobuki-ros-interfaces \
ros-$ROS_DISTRO-kobuki-core \
ros-$ROS_DISTRO-laser-proc \
ros-$ROS_DISTRO-urg-c \
ros-$ROS_DISTRO-urg-node \
ros-$ROS_DISTRO-urg-node-msgs \
ros-$ROS_DISTRO-robot-state-publisher \
ros-$ROS_DISTRO-joint-state-controller \
ros-$ROS_DISTRO-joint-state-publisher \
Expand All @@ -53,8 +62,47 @@ sudo apt-get install -y \
ros-$ROS_DISTRO-trajectory-msgs \
ros-$ROS_DISTRO-geometry-msgs \
ros-$ROS_DISTRO-joy

# refer to sobit_light
ros-$ROS_DISTRO-ros2-control \
ros-$ROS_DISTRO-ros2-controllers \
ros-$ROS_DISTRO-control-toolbox \
ros-$ROS_DISTRO-controller-interface \
ros-$ROS_DISTRO-controller-manager \
ros-$ROS_DISTRO-position-controllers \
ros-$ROS_DISTRO-velocity-controllers \
ros-$ROS_DISTRO-effort-controllers \
ros-$ROS_DISTRO-joint-trajectory-controller \
ros-$ROS_DISTRO-joint-group-impedance-controller \
ros-$ROS_DISTRO-joint-state-publisher \
ros-$ROS_DISTRO-joint-state-publisher-gui \
ros-$ROS_DISTRO-joint-state-broadcaster \
ros-$ROS_DISTRO-joint-limits \
ros-$ROS_DISTRO-robot-controllers \
ros-$ROS_DISTRO-robot-controllers-interface \
ros-$ROS_DISTRO-robot-state-publisher \
ros-$ROS_DISTRO-hardware-interface \
ros-$ROS_DISTRO-transmission-interface \
ros-$ROS_DISTRO-urdf \
ros-$ROS_DISTRO-urdf-launch \
ros-$ROS_DISTRO-xacro \
ros-$ROS_DISTRO-tf-transformations




# Install Gazebo Fortress with binaries
sudo apt-get install -y \
ros-${ROS_DISTRO}-ros-gz \
ros-${ROS_DISTRO}-ign-ros2-control \
ros-${ROS_DISTRO}-ign-ros2-control-demos

echo "╚══╣ Setup: SOBIT EDU (FINISHED) ╠══╝"



### ここから下は未確認。いるいらないがわからない。
'''
# Setting up Dynamixel USB configuration (SOBIT EDU: Head and Arm Robot Mechanism)
echo "SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6015\", SYMLINK+=\"input/dx_upper\", MODE=\"0666\"" | sudo tee /etc/udev/rules.d/dx_upper.rules

Expand All @@ -78,6 +126,10 @@ sudo udevadm control --reload-rules

# Trigger the new rules
sudo udevadm trigger
'''

# Go back to previous directory
cd ${DIR}


echo "╚══╣ Setup: SOBIT EDU (FINISHED) ╠══╝"
echo "╚══╣ Setup: SOBIT LIGHT (FINISHED) ╠══╝"
4 changes: 0 additions & 4 deletions sobit_edu/CMakeLists.txt

This file was deleted.

Empty file added sobit_edu/docs/img/.gitkeep
Empty file.
Binary file removed sobit_edu/docs/img/sobit_edu.png
Binary file not shown.
Binary file removed sobit_edu/docs/img/sobit_edu_display.png
Binary file not shown.
Binary file removed sobit_edu/docs/img/sobit_edu_onshape.png
Binary file not shown.
29 changes: 0 additions & 29 deletions sobit_edu/package.xml

This file was deleted.

59 changes: 26 additions & 33 deletions sobit_edu_bringup/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
cmake_minimum_required(VERSION 3.10.2)
cmake_minimum_required(VERSION 3.8)
project(sobit_edu_bringup)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
rospy
sensor_msgs
trajectory_msgs
geometry_msgs
)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES sobit_pro_bringup
CATKIN_DEPENDS rospy sensor_msgs trajectory_msgs geometry_msgs
# DEPENDS system_lib
install(DIRECTORY
launch
rviz
DESTINATION share/${PROJECT_NAME}
)

###########
## Build ##
###########
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
ament_package()
Empty file.
58 changes: 0 additions & 58 deletions sobit_edu_bringup/launch/azure_kinect.launch

This file was deleted.

106 changes: 106 additions & 0 deletions sobit_edu_bringup/launch/gz_minimal.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import os
from ament_index_python.packages import get_package_share_directory

from launch_ros.substitutions import FindPackageShare
from launch_ros.actions import Node

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import PathJoinSubstitution


def generate_launch_description():
gz_bridge_node = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=[
"/clock" + "@rosgraph_msgs/msg/Clock" + "[ignition.msgs.Clock",
"/tf" + "@tf2_msgs/msg/TFMessage" + "[ignition.msgs.TFMessage",
],
output='screen'
)

rviz_config = PathJoinSubstitution([
FindPackageShare('sobit_edu_bringup'),
'rviz',
'gazebo.rviz'
])
rviz_node = Node(
package='rviz2',
executable='rviz2',
output='screen',
arguments=['-d', rviz_config],
)

world_file = os.path.join(get_package_share_directory(
'sobit_light_description'),
'worlds',
'empty_w_physics.sdf'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
PythonLaunchDescriptionSource([
PathJoinSubstitution([
FindPackageShare('ros_gz_sim'),
'launch',
'gz_sim.launch.py'
])
]),
launch_arguments={
'gz_args' : ' -r -v 4 ' + world_file,
}.items()
),
gz_bridge_node,
# Launch Robot No. 1
IncludeLaunchDescription(
PythonLaunchDescriptionSource([
PathJoinSubstitution([
FindPackageShare('sobit_edu_bringup'),
'launch',
'gz_robot.launch.py'
])
]),
launch_arguments={
'robot_name': 'sobit_edu',
'robot_coords_x': '0', # x
'robot_coords_y': '0', # y
'robot_coords_Y': '0', # yaw
'enable_gz_front_cam_color' : 'True',
'enable_gz_back_cam_color' : 'True',
'enable_gz_head_cam_color' : 'True',
'enable_gz_head_cam_depth' : 'True',
'enable_gz_hand_cam_color' : 'True',
'enable_gz_hand_cam_depth' : 'True',
'enable_gz_lidar' : 'True',
'enable_gz_imu' : 'True',
}.items()
),
# Launch Robot No. 2
# IncludeLaunchDescription(
# PythonLaunchDescriptionSource([
# PathJoinSubstitution([
# FindPackageShare('sobit_light_bringup'),
# 'launch',
# 'gz_robot.launch.py'
# ])
# ]),
# launch_arguments={
# 'robot_name': 'sobit_light_2',
# 'robot_coords_x': '0', # x
# 'robot_coords_y': '2', # y
# 'robot_coords_Y': '0', # yaw
# 'enable_gz_front_cam_color' : 'True',
# 'enable_gz_back_cam_color' : 'True',
# 'enable_gz_head_cam_color' : 'True',
# 'enable_gz_head_cam_depth' : 'True',
# 'enable_gz_hand_cam_color' : 'True',
# 'enable_gz_hand_cam_depth' : 'True',
# 'enable_gz_lidar' : 'True',
# 'enable_gz_imu' : 'True',
# }.items()
# ),
rviz_node,
])
Loading