Skip to content

Commit

Permalink
Merge pull request #842 from cyberbotics/sync-master-e5f890e
Browse files Browse the repository at this point in the history
Merge master into develop
  • Loading branch information
omichel authored Aug 11, 2023
2 parents 4f270f7 + 7596ca4 commit 4ddf11a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion webots_ros2_driver/src/WebotsNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ namespace webots_ros2_driver {
}

void WebotsNode::setAnotherNodeParameter(std::string anotherNodeName, std::string parameterName, std::string parameterValue) {
mClient = create_client<rcl_interfaces::srv::SetParameters>(get_namespace() + anotherNodeName + "/set_parameters");
mClient = create_client<rcl_interfaces::srv::SetParameters>(anotherNodeName + "/set_parameters");
mClient->wait_for_service(std::chrono::seconds(1));
rcl_interfaces::srv::SetParameters::Request::SharedPtr request =
std::make_shared<rcl_interfaces::srv::SetParameters::Request>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ def load_yaml(filename):

# Check if moveit is installed
if 'moveit' in get_packages_with_prefixes():
# Webots simulation with robot
launch_description_nodes.append(
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(package_dir, 'launch', 'robot_nodes_launch.py'))
)
)

# Configuration
description = {'robot_description': load_file('ur5e_with_gripper.urdf')}
description_semantic = {'robot_description_semantic': load_file('moveit_ur5e.srdf')}
Expand Down Expand Up @@ -88,13 +95,6 @@ def load_yaml(filename):
remappings=[('/joint_states', '/ur5e/joint_states')]
)
)

# Webots simulation with robot
launch_description_nodes.append(
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(package_dir, 'launch', 'robot_nodes_launch.py'))
)
)
else:
launch_description_nodes.append(LogInfo(msg='"moveit" package is not installed, \
please install it in order to run this demo.'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ def generate_launch_description():
# When having multiple robot it is mandatory to specify the robot name.
universal_robot_driver = WebotsController(
robot_name='UR5e',
namespace='ur5e',
parameters=[
{'robot_description': robot_description_path},
{'use_sim_time': True},
{'set_robot_state_publisher': True},
ros2_control_params
],
namespace='ur5e'
)

# Other ROS 2 nodes
Expand All @@ -77,6 +77,7 @@ def generate_launch_description():

robot_state_publisher = Node(
package='robot_state_publisher',
namespace='ur5e',
executable='robot_state_publisher',
output='screen',
parameters=[{
Expand Down

0 comments on commit 4ddf11a

Please sign in to comment.