mirror of
https://github.com/westonrobot/scout_ros.git
synced 2026-01-12 11:20:02 +08:00
Merge branch 'next'
This commit is contained in:
77
README.md
77
README.md
@@ -15,90 +15,29 @@ The purple blocks represent ROS packages included within this repository.
|
|||||||
|
|
||||||
## Communication interface setup
|
## Communication interface setup
|
||||||
|
|
||||||
### Setup UART
|
Please refer to the [README](https://github.com/westonrobot/wrp_sdk#hardware-interface) of "wrp_sdk" package for setup of communication interfaces.
|
||||||
|
|
||||||
Generally your RS232-to-USB cable should be automatically recognized as "/dev/ttyUSB0" or something similar and ready for use. If you get the error "... permission denied ..." when trying to open the port, you need to grant access of the port to your user account:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo usermod -a -G dialout $USER
|
|
||||||
```
|
|
||||||
|
|
||||||
You need to re-login to get the change to take effect.
|
|
||||||
|
|
||||||
### Setup CAN-To-USB adapter
|
|
||||||
|
|
||||||
1. Enable gs_usb kernel module
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo modprobe gs_usb
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Bringup can device
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo ip link set can0 up type can bitrate 500000
|
|
||||||
```
|
|
||||||
|
|
||||||
3. If no error occured during the previous steps, you should be able to see the can device now by using command
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ifconfig -a
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Install and use can-utils to test the hardware
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install can-utils
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Testing command
|
|
||||||
|
|
||||||
```
|
|
||||||
# receiving data from can0
|
|
||||||
$ candump can0
|
|
||||||
# send data to can0
|
|
||||||
$ cansend can0 001#1122334455667788
|
|
||||||
```
|
|
||||||
|
|
||||||
Two scripts inside the "scout_bringup/scripts" folder are provided for easy setup. You can run "./setup_can2usb.bash" for the first-time setup and run "./bringup_can2usb.bash" to bring up the device each time you unplug and re-plug the adapter.
|
|
||||||
|
|
||||||
## Basic usage of the ROS package
|
## Basic usage of the ROS package
|
||||||
|
|
||||||
1. Install dependent ROS packages
|
1. Install dependent libraries
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo apt install ros-melodic-teleop-twist-keyboard
|
$ sudo apt install libasio-dev
|
||||||
|
$ sudo apt install ros-$ROS_DISTRO-teleop-twist-keyboard
|
||||||
```
|
```
|
||||||
|
|
||||||
Change ros-melodic-* in the command to ros-kinetic-* if you're using ROS Kinetic.
|
|
||||||
|
|
||||||
2. Clone the packages into your catkin workspace and compile
|
2. Clone the packages into your catkin workspace and compile
|
||||||
|
|
||||||
(the following instructions assume your catkin workspace is at: ~/catkin_ws/src)
|
(the following instructions assume your catkin workspace is at: ~/catkin_ws/src)
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd ~/catkin_ws/src
|
$ cd ~/catkin_ws/src
|
||||||
|
$ git clone https://github.com/westonrobot/wrp_sdk.git
|
||||||
$ git clone https://github.com/westonrobot/scout_ros.git
|
$ git clone https://github.com/westonrobot/scout_ros.git
|
||||||
$ cd ..
|
$ cd ..
|
||||||
$ catkin_make
|
$ catkin_make
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Setup Webots simulation
|
|
||||||
|
|
||||||
* Install Webots R2020a-rev1 (download from https://cyberbotics.com/ )
|
|
||||||
|
|
||||||
* Install Webots ROS package
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install ros-melodic-webots-ros
|
|
||||||
```
|
|
||||||
|
|
||||||
* Set WEBOTS_HOME variable, add the following line to your "~/.bashrc"
|
|
||||||
|
|
||||||
```
|
|
||||||
export WEBOTS_HOME=/usr/local/webots
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Launch ROS nodes
|
4. Launch ROS nodes
|
||||||
|
|
||||||
* Start the base node
|
* Start the base node
|
||||||
@@ -113,12 +52,6 @@ Two scripts inside the "scout_bringup/scripts" folder are provided for easy setu
|
|||||||
$ roslaunch scout_bringup scout_minimal_uart.launch
|
$ roslaunch scout_bringup scout_minimal_uart.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
* Or you can start the Webots-based simulation
|
|
||||||
|
|
||||||
```
|
|
||||||
$ roslaunch scout_bringup scout_base_sim.launch
|
|
||||||
```
|
|
||||||
|
|
||||||
* Start the keyboard tele-op node
|
* Start the keyboard tele-op node
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
# Changelog for package scout_base
|
|
||||||
|
|
||||||
## 0.0.2 (2019-06-14)
|
|
||||||
------------------
|
|
||||||
* Deprecated initial serial interface support (new one under development)
|
|
||||||
* Based on Scout SDK v0.2 with CAN interface
|
|
||||||
* Contributors: Ruixiang Du
|
|
||||||
|
|
||||||
## 0.0.1 (2019-05-08)
|
|
||||||
------------------
|
|
||||||
* Initial development of scout_base for Scout
|
|
||||||
* Contributors: Ruixiang Du
|
|
||||||
@@ -4,9 +4,6 @@ project(scout_base)
|
|||||||
## Compile as C++11, supported in ROS Kinetic and newer
|
## Compile as C++11, supported in ROS Kinetic and newer
|
||||||
add_compile_options(-std=c++11)
|
add_compile_options(-std=c++11)
|
||||||
|
|
||||||
# cmake module path
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
||||||
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
roslaunch
|
roslaunch
|
||||||
roslint
|
roslint
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# Find package: lcm
|
|
||||||
#
|
|
||||||
# This sets the following variables:
|
|
||||||
|
|
||||||
# <package>_FOUND
|
|
||||||
# <package>_INCLUDE_DIRS
|
|
||||||
# <package>_LIBRARIES
|
|
||||||
# Source: https://github.com/RobotLocomotion/director/blob/master/cmake/modules/FindLCM.cmake
|
|
||||||
|
|
||||||
|
|
||||||
macro(pkg_config_find_module varname pkgname header library pathsuffix)
|
|
||||||
|
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(${varname}_pkgconfig ${pkgname})
|
|
||||||
|
|
||||||
find_path(${varname}_INCLUDE_DIR ${header}
|
|
||||||
HINTS ${${varname}_pkgconfig_INCLUDEDIR}
|
|
||||||
PATH_SUFFIXES ${pathsuffix}
|
|
||||||
DOC "Path to ${pkgname} include directory")
|
|
||||||
|
|
||||||
find_library(${varname}_LIBRARY ${library} HINTS ${${varname}_pkgconfig_LIBDIR} DOC "Path to ${pkgname} library")
|
|
||||||
|
|
||||||
set(${varname}_INCLUDE_DIRS ${${varname}_INCLUDE_DIR})
|
|
||||||
set(${varname}_LIBRARIES ${${varname}_LIBRARY})
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(${varname} DEFAULT_MSG ${varname}_INCLUDE_DIR ${varname}_LIBRARY)
|
|
||||||
|
|
||||||
mark_as_advanced(${varname}_INCLUDE_DIR)
|
|
||||||
mark_as_advanced(${varname}_LIBRARY)
|
|
||||||
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
|
|
||||||
pkg_config_find_module(LCM lcm lcm/lcm.h lcm lcm)
|
|
||||||
Reference in New Issue
Block a user