Skip to content

Commit

Permalink
Use more specific package names
Browse files Browse the repository at this point in the history
  • Loading branch information
martinaxgloria committed Nov 28, 2024
1 parent 49e2b96 commit d40c714
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ This package contains `xcub_ros2_controllers` plugin that is used in [ros2_contr
- a `velocity state interface` used to read the velocity of each joint;
- a `position command interface` used to forward the desired position to the joints.

### xcub_robot
### xcub_moveit_robot

This package contains some launch files, depending on the nodes you want to run.

Expand Down Expand Up @@ -183,7 +183,7 @@ source install/setup.bash
export YARP_ROBOT_NAME="iCubGazeboV2_5"

# Launch the start-up nodes
ros2 launch xcub_robot robot_sim.launch.py
ros2 launch xcub_moveit_robot robot_sim.launch.py
```

In this way, both rviz2 and gazebo windows are opened with the iCub model spawned in the two environments. At this point, open another shell, build and source the enviroment and then launch the ros2_control nodes:
Expand All @@ -196,7 +196,7 @@ source install/setup.bash
export YARP_ROBOT_NAME="iCubGazeboV2_5"

# Launch the ros2_control nodes
ros2 launch xcub_robot robot_controls.launch.py
ros2 launch xcub_moveit_robot robot_controls.launch.py
```

To verify that everthing has been done successfully, you can run in a separate shell:
Expand All @@ -216,13 +216,13 @@ source install/setup.bash
export YARP_ROBOT_NAME="iCubGazeboV2_5"

# For the grasping demo
ros2 launch xcub_robot grasp_demo.launch.py
ros2 launch xcub_moveit_robot grasp_demo.launch.py
```

If you want to see iCub performing a circle movement, instead of the last line, you can run:

```shell
ros2 launch xcub_robot circle_demo.launch.py
ros2 launch xcub_moveit_robot circle_demo.launch.py
```

and follow the instructions on the third shell you opened.
Expand Down
4 changes: 2 additions & 2 deletions xcub_moveit_all_packages/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ project(xcub-moveit2)

# The order of inclusion was taken from colcon graph output
add_subdirectory(../xcub_ergocub_moveit_config ${CMAKE_CURRENT_BINARY_DIR}/xcub_ergocub_moveit_config)
add_subdirectory(../xcub_grasp ${CMAKE_CURRENT_BINARY_DIR}/xcub_grasp)
add_subdirectory(../xcub_moveit_grasp ${CMAKE_CURRENT_BINARY_DIR}/xcub_moveit_grasp)
add_subdirectory(../xcub_icub_moveit_config ${CMAKE_CURRENT_BINARY_DIR}/xcub_icub_moveit_config)
add_subdirectory(../xcub_ros2_controllers ${CMAKE_CURRENT_BINARY_DIR}/xcub_ros2_controllers)
add_subdirectory(../xcub_robot ${CMAKE_CURRENT_BINARY_DIR}/xcub_robot)
add_subdirectory(../xcub_moveit_robot ${CMAKE_CURRENT_BINARY_DIR}/xcub_moveit_robot)
add_subdirectory(../xcub_moveit_test_controller ${CMAKE_CURRENT_BINARY_DIR}/xcub_moveit_test_controller)

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.8)
project(xcub_grasp)
project(xcub_moveit_grasp)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
Expand Down
2 changes: 1 addition & 1 deletion xcub_grasp/package.xml → xcub_moveit_grasp/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>xcub_grasp</name>
<name>xcub_moveit_grasp</name>
<version>0.0.0</version>
<description>ROS2 package for grasping task</description>
<maintainer email="[email protected]">Martina Gloria</maintainer>
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions xcub_robot/CMakeLists.txt → xcub_moveit_robot/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.8)
project(xcub_robot)
project(xcub_moveit_robot)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
Expand All @@ -18,13 +18,13 @@ find_package(hardware_interface REQUIRED)
find_package(yarp_control_msgs REQUIRED)
find_package(YARP REQUIRED)

add_executable(xcub_robot src/robot_moveit.cpp launch/spawn_model.py)
target_include_directories(xcub_robot PUBLIC
add_executable(xcub_moveit_robot src/robot_moveit.cpp launch/spawn_model.py)
target_include_directories(xcub_moveit_robot PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(xcub_robot PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_compile_features(xcub_moveit_robot PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
ament_target_dependencies(
xcub_robot
xcub_moveit_robot
"moveit_ros_planning_interface"
"rclcpp"
"rclpy"
Expand All @@ -38,7 +38,7 @@ ament_target_dependencies(
target_sources(${PROJECT_NAME} PRIVATE src/robot_moveit.cpp)
target_link_libraries(${PROJECT_NAME} ${YARP_LIBRARIES})

install(TARGETS xcub_robot DESTINATION lib/${PROJECT_NAME})
install(TARGETS xcub_moveit_robot DESTINATION lib/${PROJECT_NAME})
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
install(PROGRAMS launch/spawn_model.py DESTINATION lib/${PROJECT_NAME})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def generate_launch_description():
moveit_config = MoveItConfigsBuilder("xcub_"+robot_name).to_moveit_configs()

circle_demo = Node(
name="xcub_robot",
package="xcub_robot",
executable="xcub_robot",
name="xcub_moveit_robot",
package="xcub_moveit_robot",
executable="xcub_moveit_robot",
output="screen",
parameters=[
moveit_config.robot_description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def generate_launch_description():

grasping_demo = Node(
name="grasping",
package="xcub_grasp",
executable="xcub_grasp",
package="xcub_moveit_grasp",
executable="xcub_moveit_grasp",
output="screen",
parameters=[
moveit_config.robot_description,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def generate_launch_description():
)

model_spawner = Node(
package='xcub_robot',
package='xcub_moveit_robot',
executable='spawn_model.py',
name='spawn_entity',
output='screen',
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion xcub_robot/package.xml → xcub_moveit_robot/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>xcub_robot</name>
<name>xcub_moveit_robot</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="[email protected]">martinagloria</maintainer>
Expand Down
File renamed without changes.

0 comments on commit d40c714

Please sign in to comment.