Git Product home page Git Product logo

scout_ros's Introduction

ROS Packages for Scout Mobile Robot

Packages

This repository contains minimal packages to control the scout robot using ROS.

  • scout_bringup: launch and configuration files to start ROS nodes
  • scout_base: a ROS wrapper around ugv_sdk to monitor and control the scout robot
  • scout_description: URDF model for the mobile base, a sample urdf (scout_description/sample/scout_v2_nav.xacro) is provided for customized robot with addtional sensors
  • scout_msgs: scout related message definitions

Update the packages for your customized robot

Additional sensors

It's likely that you may want to add additional sensors to the scout mobile platform, such as a Lidar for navigation. In such cases, a new ".xacro" file needs to be created to describe the relative pose of the new sensor with respect to the robot base, so that the sensor frame can be reflected in the robot tf tree.

A sample ".xacro" file is present in this repository, in which the base ".xacro" file of an empty scout platform is first included, and then additional links are defined.

The nodes in this ROS package are made to handle only the control of the scout base and publishing of the status. Additional nodes may need to be created by the user to handle the sensors.

Alternative odometry calculation

By default the scout_base package will publish odometry message to topic "/odom". In case you want to use a different approach to calculate the odometry, for example estimating the position together with an IMU, you could rename the default odometry topic to be something else.

$ roslaunch scout_bringup scout_base_robot.launch odom_topic_name:="<custom_name>"

Communication interface setup

Please refer to the README of "ugv_sdk" package for setup of communication interfaces.

Note on CAN interface on Nvidia Jetson Platforms

Nvidia Jeston TX2/Xavier/XavierNX have CAN controller(s) integrated in the main SOC. If you're using a dev kit, you need to add a CAN transceiver for proper CAN communication.

Basic usage of the ROS packages

  1. Install dependent libraries

    $ sudo apt install -y libasio-dev
    $ sudo apt install -y ros-$ROS_DISTRO-teleop-twist-keyboard
    
  2. Clone the packages into your catkin workspace and compile

    (the following instructions assume your catkin workspace is at: ~/catkin_ws/src)

    $ cd ~/catkin_ws/src
    $ git clone https://github.com/agilexrobotics/ugv_sdk.git  
    $ git clone https://github.com/agilexrobotics/scout_ros.git
    $ cd ..
    $ catkin_make
    
  3. Setup CAN-To-USB adapter

  • Enable gs_usb kernel module(If you have already added this module, you do not need to add it)

    $ sudo modprobe gs_usb
    
  • first time use scout-ros package

    $ rosrun scout_bringup setup_can2usb.bash
    
  • if not the first time use scout-ros package(Run this command every time you turn off the power)

    $ rosrun scout_bringup bringup_can2usb.bash
    
  • Testing command

    # receiving data from can0
    $ candump can0
    
  1. Launch ROS nodes
  • Start the base node for scout

    $ roslaunch scout_bringup scout_robot_base.launch 
    

    The scout_bringup/scout_minimal.launch has 5 parameters:

    • port_name: specifies the port used to communicate with the robot, default = "can0"
    • simulated_robot: indicates if launching with a simulation, default = "false"
    • model_xacro: specifies the target ".xacro" file for the publishing of tf frames, default = scout_v2.xacro
    • odom_topic_name: sets the name of the topic which calculated odometry is published to, defaults = "odom"
    • is_scout_mini:Suitable for chassis of type scout_mini,defaults = "false"
  • Start the base node for scout-mini

    $ roslaunch scout_bringup scout_mini_robot_base.launch
    
  • Start the base node for scout-min(omni mode)

    $ roslaunch scout_bringup scout_miniomni_robot_base.launch
  • Start the keyboard tele-op node

    $ roslaunch scout_bringup scout_teleop_keyboard.launch
    

    SAFETY PRECAUSION:

    The default command values of the keyboard teleop node are high, make sure you decrease the speed commands before starting to control the robot with your keyboard! Have your remote controller ready to take over the control whenever necessary.

scout_ros's People

Contributors

agilexrobotics avatar lagrangeluo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scout_ros's Issues

Bug: Incorrect Assignment in PublishOdometryToROSOmni Function (scout_base/src/scout_messenger.cpp)

There is a potential issue in the PublishOdometryToROSOmni function in the file scout_base/src/scout_messenger.cpp. Specifically, there may be an error in handling lateral velocity.

At line 354 of the file, the following line directly assigns the lateral velocity (lateral_speed_) to odom_msg.twist.twist.linear.y, instead of adding it to the twist section:

odom_msg.twist.twist.linear.y = 0.0;

It is recommended to correct it as follows:

odom_msg.twist.twist.linear.y = lateral_speed_;

I expect the value of linear.y to reflect the value of lateral_speed_, ensuring that the odometry message correctly contains lateral velocity information.

ROS fails to launch scout mini

roslaunch scout_bringup scout_mini_robot_base.launch
... logging to /home/harvey/.ros/log/1fce64a8-13f9-11ec-8fb5-ec2e98ca62cd/roslaunch-harvey-desktop-18794.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://harvey-desktop:44193/

SUMMARY

PARAMETERS

  • /robot_description: <?xml version="1....
  • /rosdistro: melodic
  • /rosversion: 1.14.11
  • /scout_base_node/base_frame: base_link
  • /scout_base_node/is_scout_mini: True
  • /scout_base_node/odom_frame: odom
  • /scout_base_node/odom_topic_name: odom
  • /scout_base_node/port_name: can0
  • /scout_base_node/simulated_robot: False

NODES
/
joint_state_publisher (joint_state_publisher/joint_state_publisher)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
scout_base_node (scout_base/scout_base_node)

auto-starting new master
process[master]: started with pid [18813]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 1fce64a8-13f9-11ec-8fb5-ec2e98ca62cd
process[rosout-1]: started with pid [18829]
started core service [/rosout]
process[scout_base_node-2]: started with pid [18840]
process[joint_state_publisher-3]: started with pid [18847]
process[robot_state_publisher-4]: started with pid [18854]
Working as scout mini: 1
Start listening to port: can0
Detected protocol: UNKONWN
================================================================================REQUIRED process [scout_base_node-2] has died!
process has died [pid 18840, exit code 255, cmd /home/harvey/Desktop/GitHub/project_heatmap/swarmbot/GUI_demo/robotics/warthog_ws/devel/lib/scout_base/scout_base_node __name:=scout_base_node __log:=/home/harvey/.ros/log/1fce64a8-13f9-11ec-8fb5-ec2e98ca62cd/scout_base_node-2.log].
log file: /home/harvey/.ros/log/1fce64a8-13f9-11ec-8fb5-ec2e98ca62cd/scout_base_node-2*.log
Initiating shutdown!

[robot_state_publisher-4] killing on exit
[joint_state_publisher-3] killing on exit
[scout_base_node-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

meaning of scout_msgs

Could you please introduce the meaning of each variable in ScoutStatus.msg, and also other variables in xxx.msg. Thanks!

build error

/home/gy2/3rd/drivers_ws/src/ugv_sdk/include/ugv_sdk/details/async_port/async_can.hpp:41:16: error: ‘basic_stream_descriptor’ in namespace ‘asio::posix’ does not name a template type; did you mean ‘stream_descriptor’?
41 | asio::posix::basic_stream_descriptor<> socketcan_stream_;
| ^~~~~~~~~~~~~~~~~~~~~~~
| stream_descriptor
/home/gy2/3rd/drivers_ws/src/ugv_sdk/include/ugv_sdk/details/async_port/async_can.hpp:49:34: error: ‘asio::posix::basic_stream_descriptor’ has not been declared
49 | asio::posix::basic_stream_descriptor<> &stream);
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/gy2/3rd/drivers_ws/src/ugv_sdk/include/ugv_sdk/details/async_port/async_can.hpp:49:57: error: expected ‘,’ or ‘...’ before ‘<’ token
49 | asio::posix::basic_stream_descriptor<> &stream);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.