Fejemis: Difference between revisions

From Rsewiki
 
(14 intermediate revisions by 2 users not shown)
Line 12: Line 12:
The URDF file is made using [https://onshape-to-robot.readthedocs.io/en/latest/ Onshape-to-robot]
The URDF file is made using [https://onshape-to-robot.readthedocs.io/en/latest/ Onshape-to-robot]
There are added a dummy link for ROS and it is placed in its own ROS package.
There are added a dummy link for ROS and it is placed in its own ROS package.
Important note: currently non-DOF relation (like two parts being fastened together) don't work on top-level assembly (therefore you can make the different parts as subassemblies, but you need an assembly joining the subassemblies using non-DOF before the assembly that places the wheels and other DOF.
== Hardware ==
Motor is DSMP420_24_61_BFE:  24V, gear: 61:1, encoder 20 pulses per revolution (5 magnets, two sensors)


== Main electronics ==
== Main electronics ==
Line 45: Line 50:
This section holds also the tool-chain instructions.  
This section holds also the tool-chain instructions.  


==== Bridge or Hardware abstraction ====
==== Bridge and message broker ====


The hardware is integrated with the PC in a bridge-unit that also integrate a manual (remote control) possibility.
The hardware is integrated with the PC in a bridge-unit that also integrate a manual (remote control) possibility.
Line 51: Line 56:
This [[Fejemis bridge]] should also provide the needed interface to ROS (to drive and control the operation).
This [[Fejemis bridge]] should also provide the needed interface to ROS (to drive and control the operation).


==== ROS overview ====
== ROS overview ==
 
A short guideline on how to use the ROS2 stack on the robot.
 
WiFi is set up to connect to DTU device network and usually gets these IP addresses:
* 10.199.256.209 (when on 2.4 GHz net) or
* 10.197.216.64  (when on 5 GHz net).
 
Username is ''local''
 
=== Launch===
 
Launching the bridge (from anywhere):
ros2 launch fejemis_bridge bridge.launch.py
 
Launching the mixer + gamepad control (from anywhere):
ros2 launch fejemis_bridge mixer.launch.py
 
You can launch both at once with the following command: ros2 launch fejemis_bridge control.launch.py


[[Fejemis ROS]]
=== Gamepad control ===


==== Reboot and startup ====
You need to press the "BACK" button on the gamepad to actually start the control from the gamepad.


It seems like the Intel NUC has problems detecting the WiFi at first cold boot.
=== Other utilities ===
This is fixed by a small script "/home/local/wifitest.sh" like:


#!/bin/bash
If you want to generate a square signal, you can use the node I made:
# test if WiFi interface is available
# if not, then reboot (after 2 minutes to allow stopping)
# save date and result to logfile
date >>/home/local/rebootinfo.txt
ifconfig wlp58s0  >>/home/local/rebootinfo.txt
# $? is result of last call
if [ $? -eq 0 ]; then
    echo "wifi device wlp58s0 is Online" >>/home/local/rebootinfo.txt
else
    echo "wifi device wlp58s0 is Offline" >>/home/local/rebootinfo.txt
    sleep 120
    echo "time to reboot" >>/home/local/rebootinfo.txt
    reboot now
fi


The script is called from /etc/rc.local like:
ros2 run arcana_tools signal_generator --ros-args -p frequency:=<signal_freq> -p out_type:=<output ROS2 type> -r /sig_out:=<output topic> -p bias:=<signal bias> -p range:=<vmax-vmin>


/home/local/wifitest.sh &
Typically you wight want to send it as if it was a gamepad input:


When WiFi is up, it should connect to the "device" access point to get an IP
ros2 run arcana_tools signal_generator--ros-args -p frequency:=0.5 -p out_type:=geometry_msgs.msg.Twist.linear.x -r /sig_out:=/joy_control/cmd_vel -p range:=0.5
(agreed with itservice) 10.199.253.209.


The Wifi is made available without any user (server mode) by modifying
You can display graphs using the rqt tool (type rqt in a terminal). There's a plugin "Vizualization>Plot" that integrate the python 3 matplotlib package.


/etc/NetworkManager/system-connections/device.nmconnection
To enable the fetching of the wheels velocities from the bridge, you may need to edit the file "~/.config/fejemis_bridge/bridge.yaml" and set enable: true instead of false in the vel section.


The permissions line the connection section is changed to just
=== old stuff ===


permissions=
Depricated [[Fejemis ROS]] (outdated)


== Main functionality ==
== Main functionality ==

Latest revision as of 17:17, 4 May 2025

Project to automate the nice fejemis brush-cleaner

Autonomous Fejemis

Figure: Sketch of Fejemis from OnShape. The front part in yellow and black is a commercial brush for industry floor. The manual handle has been replaced with the Fejemis drive system. The front wheel can be lowered to allow the brush to be lifted when not in use.

The drawings can be accessed here: https://cad.onshape.com/documents/c3f44096b0f5e4646ed48e3f/w/670467f68cac02b087631e3d/e/e591dbcff8879adc4528ee2b

Onshape to robot

The URDF file is made using Onshape-to-robot There are added a dummy link for ROS and it is placed in its own ROS package. Important note: currently non-DOF relation (like two parts being fastened together) don't work on top-level assembly (therefore you can make the different parts as subassemblies, but you need an assembly joining the subassemblies using non-DOF before the assembly that places the wheels and other DOF.

Hardware

Motor is DSMP420_24_61_BFE: 24V, gear: 61:1, encoder 20 pulses per revolution (5 magnets, two sensors)

Main electronics

Figure: The main hardware blocks. Two Teensy processors are the interface to the hardware. The drive processor controls the drive motors, safety and battery system. The front processor controls the brush and the front wheel to lift the brush. A main PC integrates the functionality with additional sensors to allow autonomous operation.

Electrical

Fejemis electrical wiring etc.

Teensy firmware

Fejemis Teensy software is build using standard Arduino library configurations. The interface to the main PC is organized as text-lines.

Battery control

The Fejemis battery control is a 24V system (2x3cell LiPo 5Ah) with power on-off and measurement electronics. There is on-board chargers for all batteries.

Brush unit

The Fejemis brush unit is a commercial brush that comes with its own battery (12V), charger and motor control. The unit is slightly modified to to allow measurement and control from the software.

Main software

Software repository

The Fejemis repository holds the documentation and source-code.

This section holds also the tool-chain instructions.

Bridge and message broker

The hardware is integrated with the PC in a bridge-unit that also integrate a manual (remote control) possibility.

This Fejemis bridge should also provide the needed interface to ROS (to drive and control the operation).

ROS overview

A short guideline on how to use the ROS2 stack on the robot.

WiFi is set up to connect to DTU device network and usually gets these IP addresses:

  • 10.199.256.209 (when on 2.4 GHz net) or
  • 10.197.216.64 (when on 5 GHz net).

Username is local

Launch

Launching the bridge (from anywhere):

ros2 launch fejemis_bridge bridge.launch.py

Launching the mixer + gamepad control (from anywhere):

ros2 launch fejemis_bridge mixer.launch.py

You can launch both at once with the following command: ros2 launch fejemis_bridge control.launch.py

Gamepad control

You need to press the "BACK" button on the gamepad to actually start the control from the gamepad.

Other utilities

If you want to generate a square signal, you can use the node I made:

ros2 run arcana_tools signal_generator --ros-args -p frequency:=<signal_freq> -p out_type:=<output ROS2 type> -r /sig_out:=<output topic> -p bias:=<signal bias> -p range:=<vmax-vmin>

Typically you wight want to send it as if it was a gamepad input:

ros2 run arcana_tools signal_generator--ros-args -p frequency:=0.5 -p out_type:=geometry_msgs.msg.Twist.linear.x -r /sig_out:=/joy_control/cmd_vel -p range:=0.5

You can display graphs using the rqt tool (type rqt in a terminal). There's a plugin "Vizualization>Plot" that integrate the python 3 matplotlib package.

To enable the fetching of the wheels velocities from the bridge, you may need to edit the file "~/.config/fejemis_bridge/bridge.yaml" and set enable: true instead of false in the vel section.

old stuff

Depricated Fejemis ROS (outdated)

Main functionality

Mapping and localization

The system should be able to systematically sweep the floor and therefore need knowledge of own position.

Sweeping control

The sweeping mission should be planned based on knowledge of the area to sweep and the schedule to do so.

The Fejemis should avoid swallowing loose cables and the hanging drone-net as some of the most troublesome obstacles.

Situation awareness

The Fejemis should be aware of the users of the facility and it should postpone cleaning if the situation is not sufficiently quiet.

Automatic charging

Charging requires 230V AC, and the Fejemis should be able to dock into a power outlet autonomously.

Garbage dumping

Garbage dumping is probably not going to be autonomous, but it would be nice with a warning when the dust-bin is full.