Coder Social home page Coder Social logo

tuna's Introduction

Diagram

License: MIT

About

Tuna is an open-electronics and open-software GNSS platform for ROS, based on the Pi 4. It uses diff drive control for locomotion with diff_drive_simple, a standard percision GNSS receiver for absolute localization with navsat_simple, and an IMU for rotational data. If you see the overreaching theme there, I'm trying to keep everything as simple as possible.

In the current iteration it uses Vizanti as the mission planner and line_planner as its local planner. You can find more specific info below or in the related videos.

List of videos about construction and testing:

Video Description
Watch the video Hardware setup and general software stack info, initial testing with ROS Mobile and navsat_transform_node.
Watch the video Practical navigation experiments with proprietary EZ-Map and gps_common. Simulation in Ignition Gazebo.
Watch the video Open source navigation and interface with Vizanti, developing the more accurate line_planner. Survey pattern tests.

Circuit Diagram

Diagram

Node Graph

Diagram

Installation

Running in Gazebo Fortress

Gazebo

Base requirements:

Clone repos:

cd ~/catkin_ws/src
git clone https://github.com/MoffKalast/tuna.git
# Diff drive controller
git clone https://github.com/MoffKalast/diff_drive_simple.git
# Localization fusion
git clone https://github.com/MoffKalast/navsat_simple.git
# Goal planner
git clone https://github.com/MoffKalast/line_planner.git

# Optional, for RViz Viewing
git clone https://github.com/nobleo/rviz_satellite.git

# ign bridge setup, skip if already installed
export IGNITION_VERSION=fortress
git clone https://github.com/osrf/ros_ign.git -b noetic

cd ~/catkin_ws
rosdep install --from-paths src --ignore-src --rosdistro=noetic -y
catkin_make

Run:

# Run the sim
roscd tuna_gazebo
ign gazebo water_world.sdf -r

# Run bridge and navigation nodes
roslaunch tuna_gazebo ign.launch

# Visualize
roslaunch tuna_viz rviz.launch

# Turn on currnent/wind simulation
rosrun tuna_gazebo wave_generator.py

Running with Vizanti

Vizanti

Install:

cd ~/catkin_ws/src
https://github.com/MoffKalast/vizanti.git
cd ..
rosdep install --from-paths src --ignore-src --rosdistro=noetic -y
catkin_make

Run:

roslaunch vizanti server.launch

Then view http://localhost:5000


Running on a Raspberry Pi

Clone hw drivers:

cd ~/catkin_ws/src
git clone https://github.com/dpkoch/imu_calib.git
git clone https://github.com/MoffKalast/onewiretemp.git
git clone https://github.com/MoffKalast/safety_light.git
git clone https://github.com/MoffKalast/mpu9255.git

cd ~/catkin_ws
rosdep install --from-paths src --ignore-src --rosdistro=noetic -y
catkin_make

To run this on a Pi 4, start with a 20.04 Ubuntu Pi image, install everything as listed above, plus pigpio.

Fix services to set up correct ROS params and autorun at boot:

cd ~/catkin_ws/src/tuna/tuna_bringup/config_scripts
sudo cp roscore.service /etc/systemd/system/roscore.service

sudo cp magni-base /usr/sbin/magni-base
sudo cp roscore /usr/sbin/roscore

sudo cp env.sh /etc/ubiquity/env.sh
sudo cp ros_setup.bash /etc/ubiquity/ros_setup.bash
sudo cp ros_setup.sh /etc/ubiquity/ros_setup.sh

Changes to /boot/config.txt for i2c, uart, and LED power saving:

# disable rainbow splash screen for faster booting
disable_splash=1

# Set up UART and disable BT
dtoverlay=disable-bt
dtoverlay=uart0

# Set up I2C
dtoverlay=i2c-gpio,i2c_gpio_sda=2,i2c_gpio_scl=3,bus=1 core_freq=250

# Disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off

# Disable the Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off

# Disable ethernet port LEDs
dtparam=eth_led0=4
dtparam=eth_led1=4

Enable Kernel Interfaces

For the safety_light to have the correct kernel interface access create /etc/udev/rules.d/99-gpio.rules with the following contents (if it doesn't already exist):

SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", RUN+="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'"
SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", RUN+="/bin/chown root:gpio /sys%p/active_low /sys%p/edge /sys%p/direction /sys%p/value", RUN+="/bin/chmod 660 /sys%p/active_low /sys%p/edge /sys%p/direction /sys%p/value"

Run

This launch file will also launch automatically at boot via the magni-base service.

roslaunch tuna_bringup core.launch

tuna's People

Contributors

moffkalast 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

Watchers

 avatar  avatar  avatar  avatar

tuna's Issues

ROS2 Support

Hello, as far as I saw there is no ROS2 support but will it be come? I installed the Vizanti dashboard as ROS2, if this project can be compatible with ROS2, it would be very nice.

ign gazebo water_world.sdf -r

After i run ign gazebo water_world.sdf -r command

ODE INTERNAL ERROR 1: assertion "aabbBound >= dMinIntExact && aabbBound < dMaxIntExact" failed in collide() [collision_space.cpp:460]
Stack trace (most recent call last):
#31 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e93992ea, in
#30 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e938c4c4, in
#29 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e92ea3ce, in
#28 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e922a742, in rb_protect
#27 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e93a3f90, in rb_yield
#26 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e9396d01, in rb_vm_exec
#25 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e93905f0, in
#24 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e937f815, in
#23 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e93992ea, in
#22 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e938c4c4, in
#21 Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x7fb4e4fcf714, in
#20 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7fb4e935d939, in rb_nogvl
#19 Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x7fb4e4fcf8fb, in
#18 Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7fb4e4f79409, in
#17 Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7fb4e4f79ff4, in
#16 Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo6-ign.so.6.15.0", at 0x7fb4e4513e2a, in runServer
#15 Object "/lib/x86_64-linux-gnu/libignition-gazebo6.so.6", at 0x7fb4e40ccfdb, in ignition::gazebo::v6::Server::Run(bool, unsigned long, bool)
#14 Object "/lib/x86_64-linux-gnu/libignition-gazebo6.so.6", at 0x7fb4e40d63e7, in
#13 Object "/lib/x86_64-linux-gnu/libignition-gazebo6.so.6", at 0x7fb4e40e514a, in ignition::gazebo::v6::SimulationRunner::Run(unsigned long)
#12 Object "/lib/x86_64-linux-gnu/libignition-gazebo6.so.6", at 0x7fb4e40e491d, in ignition::gazebo::v6::SimulationRunner::Step(ignition::gazebo::v6::UpdateInfo const&)
#11 Object "/lib/x86_64-linux-gnu/libignition-gazebo6.so.6", at 0x7fb4e40dda11, in ignition::gazebo::v6::SimulationRunner::UpdateSystems()
#10 Object "/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/libignition-gazebo-physics-system.so", at 0x7fb4c4704485, in ignition::gazebo::v6::systems::Physics::Update(ignition::gazebo::v6::UpdateInfo const&, ignition::gazebo::v6::EntityComponentManager&)
#9 Object "/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/libignition-gazebo-physics-system.so", at 0x7fb4c46f030c, in ignition::gazebo::v6::systems::PhysicsPrivate::Step(std::chrono::duration<long, std::ratio<1l, 1000000000l> > const&)
#8 Object "/usr/lib/x86_64-linux-gnu/ign-physics-5/engine-plugins/libignition-physics-dartsim-plugin.so", at 0x7fb4c455e75d, in ignition::physics::dartsim::SimulationFeatures::WorldForwardStep(ignition::physics::Identity const&, ignition::physics::SpecifyData<ignition::physics::RequireDataignition::physics::WorldPoses, ignition::physics::ExpectData<ignition::physics::ChangedWorldPoses, ignition::physics::Contacts, ignition::physics::JointPositions> >&, ignition::physics::CompositeData&, ignition::physics::ExpectData<ignition::physics::ApplyExternalForceTorques, ignition::physics::ApplyGeneralizedForces, ignition::physics::VelocityControlCommands, ignition::physics::ServoControlCommands> const&)
#7 Object "/lib/x86_64-linux-gnu/libdart.so.6", at 0x7fb4b8eafd20, in dart::simulation::World::step(bool)
#6 Object "/lib/x86_64-linux-gnu/libdart.so.6", at 0x7fb4b8e947b5, in dart::constraint::ConstraintSolver::solve()
#5 Object "/lib/x86_64-linux-gnu/libdart.so.6", at 0x7fb4b8e9327d, in dart::constraint::ConstraintSolver::updateConstraints()
#4 Object "/lib/x86_64-linux-gnu/libdart-collision-ode.so.6", at 0x7fb4cc03bb6b, in dart::collision::OdeCollisionDetector::collide(dart::collision::CollisionGroup*, dart::collision::CollisionOption const&, dart::collision::CollisionResult*)
#3 Object "/lib/x86_64-linux-gnu/libode.so.8", at 0x7fb4c41de456, in dxHashSpace::collide(void*, void ()(void, dxGeom*, dxGeom*))
#2 Object "/lib/x86_64-linux-gnu/libode.so.8", at 0x7fb4c41e6c57, in dDebug
#1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fb4e8fae858, in abort
#0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fb4e8fcf00b, in gsignal
Aborted (Signal sent by tkill() 24754 1000)

i think its related to https://answers.gazebosim.org/question/27052/ode-crash-on-a-simple-scenario-on-ignition-gazebo/

thank you.

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.