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

Fixed missing imports. #2

Merged
merged 4 commits into from
Aug 3, 2023
Merged
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
11 changes: 1 addition & 10 deletions uuv_assistants/src/message_to_tf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include <tf2/LinearMath/Transform.h>
#include <tf2_ros/transform_broadcaster.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>


std::string g_odometry_topic;
Expand Down Expand Up @@ -72,15 +72,6 @@ void addTransform(std::vector<geometry_msgs::msg::TransformStamped>& transforms,
transforms.push_back(new_msg);
}

namespace tf2
{
//Specialization for Point msg
static inline void fromMsg(const geometry_msgs::msg::Point& msgIn, tf2::Vector3& out)
{
out = Vector3(msgIn.x, msgIn.y, msgIn.z);
}
}

std::string stripSlash(const std::string & in)
{
if (in.size() && in[0] == '/')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// limitations under the License.

#include <boost/algorithm/string.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/shared_ptr.hpp>

#include <limits>
Expand Down
2 changes: 2 additions & 0 deletions uuv_gazebo_plugins/uuv_gazebo_ros_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ find_package(tf2_ros REQUIRED)
find_package(uuv_gazebo_plugins REQUIRED)
find_package(uuv_gazebo_ros_plugins_msgs REQUIRED)
find_package(visualization_msgs REQUIRED)
find_package(gazebo_ros REQUIRED)

set(BASE_LIBS
ament_cmake
Expand All @@ -34,6 +35,7 @@ set(BASE_LIBS
uuv_gazebo_plugins
uuv_gazebo_ros_plugins_msgs
visualization_msgs
gazebo_ros
)

include_directories(include)
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/auv_underwater_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Underwater environment with the ODE physics engine configured for vehicles using
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true"/>
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/empty_underwater_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ clearly show it is not the case-->
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true"/>
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/herkules_ship_wreck.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true" />
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/lake.launch
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true"/>
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/mangalia.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true" />
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/mangalia_manipulation.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true" />
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/munkholmen.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true" />
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
4 changes: 1 addition & 3 deletions uuv_gazebo_worlds/launch/ocean_waves.launch
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<launch>
<arg name="gui" default="true"/>
<arg name="paused" default="false"/>
Expand All @@ -22,9 +23,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="$(var debug)"/>
<arg name="verbose" value="true"/>
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<!-- Also investigate why /gazebo ns has a strong bad perf impact-->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
2 changes: 0 additions & 2 deletions uuv_gazebo_worlds/launch/subsea_bop_panel.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="true" />
<!-- TODO Remove force_system in foxy, as it will be loaded by default -->
<arg name="extra_gazebo_args" value="-s libgazebo_ros_force_system.so --ros-args -r gazebo:__ns:=/gazebo"/>
</include>

<include file="$(find-pkg-share uuv_assistants)/launch/publish_world_ned_frame.launch">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <tf2_msgs/msg/tf_message.hpp>
#include <tf2_ros/transform_listener.h>
#include <tf2_ros/transform_broadcaster.h>
#include <tf2_ros/buffer.h>

#include <geometry_msgs/msg/transform_stamped.hpp>

Expand Down
15 changes: 12 additions & 3 deletions uuv_teleop/scripts/finned_uuv_teleop.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
from plankton_utils.param_helper import parse_nested_params_to_dict
from plankton_utils.time import is_sim_time

def to_int_list(l: list):
cp = list(l)
if(len(cp) != 0 and type(cp[0]) == str):
if(len(cp) == 1):
cp = ("".join(cp)).split(",")
cp = [int(i) for i in cp]
return cp


class FinnedUUVControllerNode(Node):
def __init__(self, **kwargs):
Expand Down Expand Up @@ -63,9 +71,10 @@ def __init__(self, **kwargs):

# Read the vector for contribution of each fin on the change on
# orientation
gain_roll = self.get_parameter('gain_roll').value
gain_pitch = self.get_parameter('gain_pitch').value
gain_yaw = self.get_parameter('gain_yaw').value
gain_roll = to_int_list(self.get_parameter('gain_roll').value)
gain_pitch = to_int_list(self.get_parameter('gain_pitch').value)
gain_yaw = to_int_list(self.get_parameter('gain_yaw').value)
print(self._n_fins, gain_pitch, gain_roll, gain_yaw)

if len(gain_roll) != self._n_fins or len(gain_pitch) != self._n_fins \
or len(gain_yaw) != self._n_fins:
Expand Down
2 changes: 2 additions & 0 deletions uuv_world_plugins/uuv_world_ros_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ find_package(gazebo_dev REQUIRED)
find_package(ament_cmake REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(rclcpp REQUIRED)
find_package(gazebo_ros REQUIRED)

set(LIBS
uuv_world_plugins
Expand All @@ -26,6 +27,7 @@ set(LIBS
ament_cmake
geometry_msgs
rclcpp
gazebo_ros
)

include_directories(include)
Expand Down