-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from lge-ros2/main
Merge 'main' branch into 'foxy'
- Loading branch information
Showing
28 changed files
with
87 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,19 @@ | ||
FROM ubuntu:20.04 | ||
FROM ros:foxy-ros-base | ||
|
||
ENV HOSTNAME sim-device | ||
ENV ROS_DISTRO=foxy | ||
|
||
RUN apt update && apt upgrade -q -y && \ | ||
apt install -q -y locales curl gnupg2 lsb-release && \ | ||
apt autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN locale-gen en_US en_US.UTF-8 && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ | ||
export LANG=en_US.UTF-8 | ||
|
||
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - | ||
|
||
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list' | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt update && \ | ||
apt install -y ros-${ROS_DISTRO}-ros-base git python3-colcon-common-extensions g++ && \ | ||
apt install -y python3-websocket libzmq3-dev libprotobuf-dev protobuf-compiler ros-${ROS_DISTRO}-image-transport-plugins ros-${ROS_DISTRO}-camera-info-manager && \ | ||
apt autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p /opt/lge-ros2/src | ||
ENV HOSTNAME sim_device | ||
|
||
WORKDIR /opt/lge-ros2/src | ||
|
||
RUN git clone https://github.com/lge-ros2/sim-device.git -b ${ROS_DISTRO} | ||
RUN git clone https://github.com/lge-ros2/sim_device.git -b ${ROS_DISTRO} | ||
RUN git clone https://github.com/lge-ros2/cloi_common_interfaces.git -b ${ROS_DISTRO} | ||
|
||
WORKDIR /opt/lge-ros2 | ||
|
||
RUN apt update && apt upgrade -y && rosdep update && \ | ||
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro $ROS_DISTRO | ||
|
||
RUN ["/bin/bash", "-c", "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build --symlink-install"] | ||
|
||
COPY ./.entrypoint.sh /opt/ | ||
|
||
ENTRYPOINT ["/opt/.entrypoint.sh"] | ||
ENTRYPOINT ["/opt/.entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,3 @@ | ||
# driver sim interfaces | ||
|
||
This is 'driver sim' base class. | ||
|
||
You may need to redefine in a derived class three virtual class. | ||
|
||
```c++ | ||
class DriverSim : public rclcpp::Node | ||
{ | ||
public: | ||
explicit DriverSim(const std::string node_name, const int number_of_simbridge = 1); | ||
|
||
protected: | ||
virtual void Initialize() = 0; | ||
virtual void Deinitialize() = 0; | ||
virtual void UpdateData() = 0; | ||
|
||
void Start(); | ||
void Stop(); | ||
|
||
void AddTf2(const geometry_msgs::msg::TransformStamped _tf); | ||
void AddStaticTf2(const geometry_msgs::msg::TransformStamped _tf); | ||
|
||
bool IsRunThread(); | ||
rclcpp::Node* GetNode(); | ||
SimBridge* GetSimBridge(const int bridge_index = 0); | ||
std::string GetRobotName(); | ||
void PublishTF(); | ||
} | ||
``` | ||
'publisher' and 'subscriber' can be setup simultaneously at one SimBridge module. | ||
Following bridge combination should be setup through separated SimBridge module. | ||
- 'publisher' + ('service' or 'client') | ||
- 'subscriber' + ('service' or 'client') | ||
- 'service' + 'client' | ||
Examples of using separated SimBridge modules when base class DriverSim() is inherited. | ||
- inherit base class 'DriverSim(node name, number of sim bridge);' | ||
- Call sim bridge using bridge index | ||
- GetSimBridge(0)-> ... | ||
- GetSimBridge(1)-> ... | ||
- GetSimBridge(0)->Connect(SimBridge::Mode::SUB, m_hashKeySub); | ||
- GetSimBridge(1)->Connect(SimBridge::Mode::CLIENT, m_hashKeySub + "Info"); | ||
- GetSimBridge(0)->Disconnect(); | ||
- GetSimBridge(1)->Disconnect(); | ||
define protobuf message format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.