Skip to content

Commit

Permalink
Merge branch 'main' into docker/aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
ulken94 authored Jan 17, 2024
2 parents 9fa4b5f + 4d82beb commit 509a2ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Table of Contents
# 1. Getting started
## 1.1. Installation
### 1.1.1. Requirements
- [ROS noetic](https://wiki.ros.org/noetic/Installation/Ubuntu) (Recommended)
- [SLAMBOX-SDK](https://github.com/j-marple-dev/slambox-sdk) (v0.1.0)
- [ROS humble](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html) (Recommended)
- [SLAMBOX-SDK](https://github.com/j-marple-dev/slambox-sdk) (v0.2.0)
- glog (>=v0.6.0)
- CMake (>= 3.16.3)
- docker (Optional but highly recommended)
Expand All @@ -34,13 +34,13 @@ Table of Contents
* Our docker image includes development environment. We highly recommend docker system.
```shell
# Clone this repository
git clone https://github.com/j-marple-dev/slambox-ros.git --recursive
git clone https://github.com/j-marple-dev/slambox-ros2.git
# Change directory
cd slambox-ros
cd slambox-ros2
# Build docker image
docker build . -t jmarpledev/slambox-ros -f docker/Dockerfile --build-arg UID=$(id -u) --build-arg GID=$(id -u)
docker build . -t jmarpledev/slambox-ros2 -f docker/Dockerfile --build-arg UID=$(id -u) --build-arg GID=$(id -u)
```

### 1.1.3. Local ROS system
Expand All @@ -51,14 +51,14 @@ Table of Contents


```shell
# Assuming that your ROS workspace is ~/catkin_ws
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/j-marple-dev/slambox-ros.git --recursive
# Assuming that your ROS workspace is ~/ros2_ws
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/j-marple-dev/slambox-ros2.git --recursive
cd ../
catkin build slambox_ros
colcon build slambox_ros
# Choose the shell which you are using
source devel/setup.{bash|zsh}
source install/setup.{bash|zsh}
```

## 1.2. Configuration
Expand Down Expand Up @@ -88,28 +88,28 @@ subscribe:
### 1.3.1. Local ROS system
- Running ROS node
```shell
roslaunch slambox_ros slambox_ros_client.launch
ros2 launch slambox_ros2 slambox_ros_client_launch.py
```

- Check rostopic in another shell
```shell
rostopic hz /SLAMBOX/odom /SLAMBOX/pointcloud
ros2 topic hz /SLAMBOX/odom /SLAMBOX/pointcloud
```

### 1.3.2. Running on Docker image
- Run docker container for running SLAMBOX-ROS client
```shell
docker run -ti --privileged -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev -v $PWD:/home/user/catkin_ws/src/slambox-ros --network host jmarpledev/slambox-ros /usr/bin/zsh
docker run -ti --privileged -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev -v $PWD:/home/user/ros2_ws/src/slambox-ros2 --network host jmarpledev/slambox-ros2 /usr/bin/zsh
```

- Run docker container for running SLAMBOX-ROS client with rviz visualization
```shell
docker run -ti --privileged -e TERM=xterm-256color -e DISPLAY=:0 -v /dev:/dev -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $PWD:/home/user/catkin_ws/src/slambox-ros --network host jmarpledev/slambox-ros /usr/bin/bash -lic "roslaunch slambox_ros slambox_ros_client.launch rviz:=true"
docker run -ti --privileged -e TERM=xterm-256color -e DISPLAY=:0 -v /dev:/dev -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $PWD:/home/user/ros2_ws/src/slambox-ros2 --network host jmarpledev/slambox-ros2 /usr/bin/bash -lic "ros2 launch slambox_ros2 slambox_ros_client_launch.py"
```

- Run docker container with shell (For development environment)
```shell
docker run -ti --privileged -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev -v $PWD:/home/user/catkin_ws/src/slambox-ros --network host jmarpledev/slambox-ros /usr/bin/zsh
docker run -ti --privileged -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev -v $PWD:/home/user/ros2_ws/src/slambox-ros2 --network host jmarpledev/slambox-ros2 /usr/bin/zsh
```


Expand All @@ -121,6 +121,4 @@ Please visit https://sbox.jmarple.ai for more information.

# 4. External resources
- [glog](https://github.com/google/glog) - Google Logging Library
- [fmt](https://github.com/fmtlib/fmt) Modern formatting library
- [cli](https://github.com/daniele77/cli) - C++ CLI Library
- [ducker](https://github.com/JeiKeiLim/ducker) - Docker Helper CLI application
4 changes: 1 addition & 3 deletions src/applications/driver_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ SLAMBOXDriverClient::SLAMBOXDriverClient(const rclcpp::NodeOptions &options)
this->create_publisher<nav_msgs::msg::Odometry>(publish_odom_topic_, 1);
pointcloud_pub_ = this->create_publisher<sensor_msgs::msg::PointCloud2>(
publish_pointcloud_topic_, 1);
// request_sub_ = nh_.subscribe(subscribe_request_topic_, 1,
// &SLAMBOXDriverClient::callback_request_,
// this);

request_sub_ = this->create_subscription<std_msgs::msg::String>(
subscribe_request_topic_, 1,
std::bind(&SLAMBOXDriverClient::callback_request_, this,
Expand Down

0 comments on commit 509a2ff

Please sign in to comment.