Giter VIP home page Giter VIP logo

create3_examples's People

Contributors

alsora avatar brianabouchard avatar hilary-luo avatar justinirbt avatar shamlian 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create3_examples's Issues

create3_coverage robot namespace not supported

I'm trying to use the create3_coverage command with a robot that I created a unique namespace for (I intend to use multiple robots on the same network in the future). However, I get an output saying that "some subscriptions haven't discovered their publishers yet" and "robot nodes haven't been discovered yet".

Screenshot from 2022-09-16 11-58-08

I suspect this is because of the namespace, and the create3_coverage works on a no-namespace assumption (see below image, the /create3_coverage node is isolated and every other node is tied to /r1/..., where r1 is the namespace of my robot).

Screenshot from 2022-09-16 11-58-32

I tried editing the create3_coverage_node.cpp file to add in "/r1/" before the rclcpp::Node creation and all of the m_... actions, params, etc, and then re-building the project, but the changes didn't do anything. Is there something else I should be doing to let create3_coverage attach to my robot's namespace? Thank you.

Actions won't work in sequence

Hello,

I am trying to use actions to move the robot. I only need to perform simple tasks. Turn, drive a few feet, turn. They don't need to be done quickly or with great position. Why can I not string actions together like this? For some reason I cannot run one after the other, they always hang. This is extremely frustrating, and there is very little support online for anything other than the most basic action (which both of the action clients I have work perfectly on their own). I don't really know ROS2 extremely well, but I have been programming for several years. I understand the basics of multi-threading, blocking operations, and asyncio. As far as I understand, rclpy.spin is a blocking operation (without a multi threaded executor) which is fine because I want to wait for the action client to finish before it moves on. Why is this not working?

#!/usr/bin/env python3
import rclpy
from irobot_logger.action_undock import UndockingActionClient
from irobot_logger.action_drive_distance import DriveDistanceActionClient

def main(args=None):
    rclpy.init(args=args)

    try:
        # Initialize action clients
        undock_action_client = UndockingActionClient()

        future = undock_action_client.send_goal("{}")
        rclpy.spin_once(undock_action_client) # i've tried spin, spin_once, and spin_until_future_complete

        action_client = DriveDistanceActionClient()
        dist  = 1.0
        speed = 0.5
        future = action_client.send_goal(dist, speed)
        rclpy.spin_once(action_client)

    except KeyboardInterrupt:
        pass

    rclpy.shutdown()


if __name__ == '__main__':
    main()

Here is the drive action client


import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node

from irobot_create_msgs.action import DriveDistance

class DriveDistanceActionClient(Node):
    '''
    An example of an action client that will cause the iRobot 
    Create3 to drive a specific distance. Subclass of Node.
    '''

    def __init__(self):
        '''
        Purpose
        -------
        initialized by calling the Node constructor, naming our node 
        'drive_distance_action_client'
        '''
        super().__init__('drive_distance_action_client')
        self._action_client = ActionClient(
            self, DriveDistance, 'drive_distance')

    def send_goal(self, distance=0.5, max_translation_speed=0.15):
        '''
        Purpose
        -------
        This method waits for the action server to be available, then sends a 
        goal to the server. It returns a future that we can later wait on.
        '''
        goal_msg = DriveDistance.Goal()
        goal_msg.distance = distance
        goal_msg.max_translation_speed = max_translation_speed

        self._action_client.wait_for_server()

        self._send_goal_future = self._action_client.send_goal_async(goal_msg)

        self._send_goal_future.add_done_callback(self.goal_response_callback)
        return self._send_goal_future

    def goal_response_callback(self, future):
        '''
        Purpose
        -------
        A callback that is executed when the future is complete.
        The future is completed when an action server accepts or rejects the goal request.
        '''
        goal_handle = future.result()
        if not goal_handle.accepted:
            self.get_logger().info('Goal rejected :(')
            return

        self.get_logger().info('Goal accepted :)')

        self._get_result_future = goal_handle.get_result_async()
        self._get_result_future.add_done_callback(self.get_result_callback)

    def get_result_callback(self, future):
        '''
        Purpose
        -------
        Similar to sending the goal, we will get a future that will complete when the result is ready.
        '''
        result = future.result().result
        self.get_logger().info('Result: {0}'.format(result))
        


Lidar time out error

I have an iRobot Create3 running firmware G.3.1. Using a Raspberry PI 4 B with Ubuntu Server 20.04 on 8GB SD and ros2 galactic installed (from your guides) (the desktop version). I am using Slamtec lidar A1M8 R5. I have followed the directions to download and build the packages. It all builds fine.

When trying to run the code for the first time I get errors for the port access...

[rplidar_composition-2] [INFO] [1675195758.244521824] [rplidar_node]: RPLIDAR running on ROS 2 package rplidar_ros. SDK Version: '1.12.0'
[rplidar_composition-2] [ERROR] [1675195758.244987564] [rplidar_node]: Error, cannot bind to the specified serial port '/dev/ttyUSB0'.

I give access by sudo chmod 777 /dev/ttyUSB0 or 666. After I have fixed the first error I get this error every time I try to run it.
[rplidar_composition-2] [ERROR] [1675256952.394627028] [rplidar_node]: Error, operation time out. RESULT_OPERATION_TIMEOUT!

This is where I'm stuck now. I have tried reboots and leaving it off for a while. I have tried all 4 ports. I have tried redownloading the packages and building it again. I have tried a different baud rate, which is pointless since it was correct for the device I'm using. I have switched the USB cable to the lidar even. I have even tried Slamtec example to run the lidar which I get the same error.
ros2 run rplidar_ros rplidar_composition --ros-args -p serial_port:=/dev/ttyUSB0 -p serial_baudrate:=115200

I have only gotten it to work once when I switched the USB controller board. And I get

[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-01-27-19-57-33-073544-ubuntu-1391
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [1393]
[INFO] [rplidar_composition-2]: process started with pid [1395]
[rplidar_composition-2] [INFO] [1674849453.708146769] [rplidar_node]: RPLIDAR running on ROS 2 package rplidar_ros. SDK Version: '1.12.0'
[static_transform_publisher-1] [INFO] [1674849453.710432322] [static_transform_publisher_7VwpYAbc65MxPrhg]: Spinning until killed publishing transform from 'base_footprint' to 'laser_frame'
[rplidar_composition-2] [INFO] [1674849456.224702197] [rplidar_node]: RPLIDAR S/N: FB939DF1C3E39AC4C3E698F90B44340D
[rplidar_composition-2] [INFO] [1674849456.224960787] [rplidar_node]: Firmware Ver: 1.25
[rplidar_composition-2] [INFO] [1674849456.225071527] [rplidar_node]: Hardware Rev: 5
[rplidar_composition-2] [INFO] [1674849456.226865788] [rplidar_node]: RPLidar health status : '0'
[rplidar_composition-2] [INFO] [1674849456.227065601] [rplidar_node]: Start
[rplidar_composition-2] [INFO] [1674849456.776160315] [rplidar_node]: current scan mode: Express, max_distance: 12.0 m, Point number: 4.0K , angle_compensate: 1, flip_x_axis 0

Running the other code and starting rviz2 I was able to get it to display graphicly. But this didn't last and I got an error saying something like the que is full. After restarting the lidar server I got the same error again. This has been very long and confusing as to why its not working.

I have also tried a R6 USB board with an adapter cable and still get the same error.

The last thing I have done is on an 128GB SD installed ubuntu desktop 22.04 and ros2 humble (from your guides) (the desktop version). And installed H.0.0 firmware to the iRobot. I downloaded and built the humble version on GitHub. I added myself to the group for the USB access sudo usermod -a -G dialout $USER and still end up with the same error. I'm out of ideas at this point besides trying with an external power supply; which I don't have the tools for.

Create3 Lidar Not Working

Trying to follow this demo: https://github.com/iRobotEducation/create3_examples/tree/humble/create3_lidar

Setup

Roomba:

FastRTPS Middleware
H.1.0 Firmware

Raspberry Pi

Raspberry Pi 4
Ubuntu 22.04 Desktop
ROS2 Humble installed
.bashrc is setup for FastRTPS
Pi and Roomba communicate through Ethernet over USB

VM on my MacBook

Ubuntu 22.04 Desktop
ROS2 Humble installed
.bashrc is setup for FastRTPS

Lidar connected to Pi

IMG_3937.MOV

DF22FE30-D4EB-445B-BAF2-90F4859A636F

I worked with Professor Briana Bouchard to get the 3 devices to communicate via the wireless network, so I don't believe the problem is there. The roomba, pi, and my VM are all connected to the same wifi network. They are all using FastRTPS too. Lastly, we did disable Multicasting by following the FastDDS instructions on https://iroboteducation.github.io/create3_docs/setup/xml-config/#fast-dds.

From my VM, I can see the Roomba's topics when I do ros2 topic list and I can access the Roomba's webserver from my VM's browser.

Running the nodes

On my pi:

  • ros2 launch create3_lidar sensors_launch.py which outputs this:

Screen Shot 2023-03-22 at 5 36 06 PM

  • To fix the cannot bind to specified serial port I do sudo chmod 777 /dev/ttyUSB0 and re-run ros2 launch create3_lidar sensors_launch.py which outputs this:

Screen Shot 2023-03-22 at 5 37 19 PM

  • This command also causes my lidar to stop spinning for a second and then start spinning again.

  • In another terminal window I run ros2 launch create3_lidar slam_toolbox_launch.py and get this:

Screen Shot 2023-03-22 at 5 37 14 PM

  • I never see [async_slam_toolbox_node-1] Registering sensor: [Custom Described Lidar] as the repo README describes.

  • I open a third terminal window and run ros2 run teleop_twist_keyboard teleop_twist_keyboard. This allows me to successfully drive the roomba around!

On my VM:

  • I open a terminal and run rviz2 and open the right rviz file, and my rviz window shows this:

Screen Shot 2023-03-22 at 5 47 40 PM

  • In my terminal window where I ran rviz2 I start seeing these messages:

Screen Shot 2023-03-22 at 5 48 01 PM

  • I open a second terminal and run rqt_graph and get this:

Screen Shot 2023-03-22 at 5 48 26 PM

Not sure where the issue is. My devices can all communicate with each other, but somewhere the Lidar's readings are not being captured or sent the way they should be.

Any help is appreciated.

Issue Getting setup

I have create3 with G.3.1 firmware. I'm using lidar slamtec A1M8 R5 and a raspberry pi 4 (8GB SD) with ubuntu server 20.04 installed with galactic ros2 from your documentation. I have followed this repository example and steps to setup the lidar for SLAM but to no success.

I'm getting this error each time. It will power down the lidar then will get the error below. The lidar will power back on after error report.

ubuntu@ubuntu:~$ ros2 launch create3_lidar sensors_launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-01-27-17-57-43-941734-ubuntu-15417
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [15420]
[INFO] [rplidar_composition-2]: process started with pid [15422]
[rplidar_composition-2] [INFO] [1674842264.723120232] [rplidar_node]: RPLIDAR running on ROS 2 package rplidar_ros. SDK Version: '1.12.0'
[static_transform_publisher-1] [INFO] [1674842264.729258423] [static_transform_publisher_E5pqCdgCs5kKrqBf]: Spinning until killed publishing transform from 'base_footprint' to 'laser_frame'
[rplidar_composition-2] [ERROR] [1674842269.234857068] [rplidar_node]: Error, operation time out. RESULT_OPERATION_TIMEOUT!

And as expected the next code does not print out [async_slam_toolbox_node-1] Registering sensor: [Custom Described Lidar] as in the instructions.

ubuntu@ubuntu:~$ ros2 launch create3_lidar slam_toolbox_launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-01-27-18-07-05-127098-ubuntu-15585
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [async_slam_toolbox_node-1]: process started with pid [15587]
[async_slam_toolbox_node-1] [INFO] [1674842825.895216161] [slam_toolbox]: Node using stack size 40000000
[async_slam_toolbox_node-1] [INFO] [1674842826.380679134] [slam_toolbox]: Using solver plugin solver_plugins::CeresSolver
[async_slam_toolbox_node-1] [INFO] [1674842826.383553374] [slam_toolbox]: CeresSolver: Using SCHUR_JACOBI preconditioner.

I have tried a number of different things from changing the USB cable to the baudrate. I cannot understand what is going wrong when I have followed your documentation. I plan to try this with a fresh install on ubuntu 22.04 desktop and humble with firmware H.0.0 to see if that makes a difference. But am waiting for bigger micro SD card (32GB) to come in.

Python implementation of Coverage

Hello,

I was wondering if there is an available python implementation for the coverage action available. I have something for it, but it doesn't work just quite yet - I believe it is because it only handles the ActionClient and does not create a node like the ros2 commands do. If that is what I need to do, is there somewhere in the docs you would suggest looking at to set up a node for this to work? I can also put what code I have here if that would help. Thank you!

DOCK/UNDOCK example request

Hello,
I'm currently working on some own packages to work with the irobot create 3 robot.
I'm running into problems when performing a dock/undock action. If i'm executing a dock/undock activity, I cannot check the status of the action. More specific, it seems that the action never finishes succesfully.
Even with the CLI commands to dock and undock, I never reveive a "Goal finished with status: SUCCEEDED" message.
Is it possible to provide a python example how to process the status of the docking, e.g. to wait to move to the next scheduled goals?
Thanks in advance

FeatureRequest: Dance example create3_dance.py should exit at end of dance

Create3 Dance example create3_dance.py should exit after it logs "Time xx.x Finished Dance Sequence"

Presently, at the end of the dance sequence, the program sits spinning without purpose. It does not even catch quit via KeyboardInterrupt cleanly:

[INFO] [1635856344.914966551] [dance_command_publisher]: Time 1635856344.907283 Finished Dance Sequence
^CTraceback (most recent call last):
  File "/home/ubuntu/create3ros/create3_examples_ws/install/create3_examples_py/lib/create3_examples_py/create3_dance", line 11, in <module>
    load_entry_point('create3-examples-py==0.0.1', 'console_scripts', 'create3_dance')()
  File "/home/ubuntu/create3ros/create3_examples_ws/install/create3_examples_py/lib/python3.8/site-packages/create3_examples_py/dance/create3_dance.py", line 73, in main
    rclpy.spin(dance_publisher)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/__init__.py", line 196, in spin
    executor.spin_once()
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 699, in spin_once
    handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 685, in wait_for_ready_callbacks
    return next(self._cb_iter)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 530, in _wait_for_ready_callbacks
    context_stack.enter_context(srv.handle)
  File "/usr/lib/python3.8/contextlib.py", line 426, in enter_context
    self._push_cm_exit(cm, _exit)
  File "/usr/lib/python3.8/contextlib.py", line 461, in _push_cm_exit
    self._push_exit_callback(_exit_wrapper, True)
  File "/usr/lib/python3.8/contextlib.py", line 464, in _push_exit_callback
    self._exit_callbacks.append((is_sync, callback))
KeyboardInterrupt

The passed action is invalid

Hi,

I have installed and verified the ROS2 installation and the ability to talk to the Create3 Robot.

I type "ros2 action list -t" and I get the actions for the Create 3 robot.

When I try to execute the action /dock I get "the passed action type is invalid"

create3@create3-desktop:$ ros2 action send_goal /dock irobot_create_msgs/action/DockServo "{}"
The passed action type is invalid
create3@create3-desktop:
$ ros2 action list -t
/audio_note_sequence [irobot_create_msgs/action/AudioNoteSequence]
/dock [irobot_create_msgs/action/DockServo]
/drive_arc [irobot_create_msgs/action/DriveArc]
/drive_distance [irobot_create_msgs/action/DriveDistance]
/led_animation [irobot_create_msgs/action/LedAnimation]
/navigate_to_position [irobot_create_msgs/action/NavigateToPosition]
/rotate_angle [irobot_create_msgs/action/RotateAngle]
/undock [irobot_create_msgs/action/Undock]
/wall_follow [irobot_create_msgs/action/WallFollow]
create3@create3-desktop:~$

What am I doing wrong?

John

Coverage handles bump hazards poorly

When testing out the coverage action, I've noticed that whenever the Create3 runs into a wall or something that is relatively immovable for the robot, it spins its wheels around a bit and then aborts. For items it can move (or get moved away fast enough), it seems to just rotate around a bit and then move in a new direction, and if it bumps into another object soon afterwards it immediately aborts. My question is, why would it not back up a bit before turning around? Having this as a feature would very likely prevent the action from aborting so often, and it can still remain within the realm of a given safety feature, unless I'm misunderstanding something. It's rather annoying having to manually move the robot from a wall and then re-run the coverage action multiple times.

"ROS Way" to kill goal or the whole Coverage Server?

I have been either leaving the coverage server in the foreground of one terminal window and killing it with cntl-c, or with the PID if running in the background.

Is there a more ROS-way such as sending a kill "goal"?

How do I abort the explore goal?

Latest Lidar Humble Package Broken

I have the latest ubuntu 22.04 server running on the PI4B and the latest code under the humble branch is broken. I have looked over the commits and I can't figure out what had been changed. The original code worked great and still does when I run it. here is the commit branch that works still https://github.com/iRobotEducation/create3_examples/tree/cec3e1a5f4781a8b910de13dec12f1ca22e367d7

Here is the console output with command that has it broken and the scan topic does not start because of this.

gcc@ubuntu:~/ros2_ws$ ros2 launch create3_lidar_slam sensors_launch.py
[INFO] [launch]: All log files can be found below /home/gcc/.ros/log/2024-01-26-13-49-31-145006-ubuntu-6156
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [6172]
[static_transform_publisher-1] [WARN] [1706294971.630396616] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-1] [INFO] [1706294971.671642238] [static_transform_publisher_muODP7AlEMtH75KH]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'base_footprint' to 'laser_frame'
[INFO] [rplidar_composition-2]: process started with pid [6197]
[rplidar_composition-2] [INFO] [1706294973.679890697] [rplidar_composition]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[rplidar_composition-2] [ERROR] [1706294977.733637744] [rplidar_composition]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT! 
[ERROR] [rplidar_composition-2]: process has died [pid 6197, exit code 255, cmd '/opt/ros/humble/lib/rplidar_ros/rplidar_composition --ros-args -r __node:=rplidar_composition -r __ns:=/ --params-file /home/gcc/create3_examples_ws/install/create3_lidar_slam/share/create3_lidar_slam/config/rplidar_node.yaml'].

here is it working from the older branch that I reference above.

gcc@ubuntu:~/ros2_ws$ ros2 launch create3_lidar sensors_launch.py
[INFO] [launch]: All log files can be found below /home/gcc/.ros/log/2024-01-26-13-49-44-599246-ubuntu-6255
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [6265]
[INFO] [rplidar_composition-2]: process started with pid [6267]
[static_transform_publisher-1] [WARN] [1706294985.090244993] []: Old-style arguments are deprecated; see --help for new-style arguments
[rplidar_composition-2] [INFO] [1706294985.131224375] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[static_transform_publisher-1] [INFO] [1706294985.141901430] [static_transform_publisher_cJ3tcopAGbPMPw20]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'base_footprint' to 'laser_frame'
[rplidar_composition-2] [INFO] [1706294985.185822397] [rplidar_node]: RPLidar S/N: 8381EDF9C7E29BD1A7E39EF21352431B
[rplidar_composition-2] [INFO] [1706294985.186026599] [rplidar_node]: Firmware Ver: 1.29
[rplidar_composition-2] [INFO] [1706294985.186082691] [rplidar_node]: Hardware Rev: 7
[rplidar_composition-2] [INFO] [1706294985.237435872] [rplidar_node]: RPLidar health status : 0
[rplidar_composition-2] [INFO] [1706294985.237581408] [rplidar_node]: RPLidar health status : OK.
[rplidar_composition-2] [INFO] [1706294985.237632907] [rplidar_node]: Start
[rplidar_composition-2] [INFO] [1706294985.932674995] [rplidar_node]: current scan mode: Sensitivity, sample rate: 8 Khz, max_distance: 12.0 m, scan frequency:10.0 Hz, 

This works and the scan topic exists. and if you echo it shows the scans as you would expect. Now even though the error is the same as my previous issue here #41 it is not the same issue since the original code that was used here works well and I understand what I did wrong. But now its unknown what was done wrong. since the new code is the problem from my testing.

I could really use help to figure this out or get some hotfixes in to fix the code.

script usage

I'm working with Irobot development kit and we originally had python scripts to drive pycreate 2 (connected to a raspberry pi, python scripts using pycreate2 python lib).
We wanted to move to pycreate3, so I followed the tutorial to install webserver on raspberry pi 4 using ROS2. And I m now able to play with the robot .

I m interested on the example teleop in order to know how to call the robot messages into python scripts.
My first guess was to "connect" my legacy script in order to replace motion command by the one from teleop. Unfortunately I can't find how to call basic robot motion. In the python_example folder I can't find any api, is there using a library that I can reuse for my scripts?
What do you suggest ?

Many thanks

Building on Windows

So I am simply trying out RoboStack on windows 10; to see if I can use ROS on windows effectively. So far building packages irobot_create_msgs and all packages of create3_examples except for create3_coverage builds without errors. I installed ros2 humble using RoboStack and it works great so far.

The first error is this:

C:\***\irobot_create\src\create3_examples\create3_coverage\src\coverage_state_machine.cpp(214,48): error C2065: 'M_PI': undeclared identifier [C:\***\irobot_create\build\create3_coverage\create3_coverage_core.vcxproj]
C:\***\irobot_create\src\create3_examples\create3_coverage\src\coverage_state_machine.cpp(214,55): error C2065: 'M_PI': undeclared identifier [C:\***\irobot_create\build\create3_coverage\create3_coverage_core.vcxproj]

Which after doing my research is a common windows building issue and is fixable by adding #define _USE_MATH_DEFINES to the top of the file coverage_state_machine.cpp this tells windows cmake that M_PI is defined and not undeclared.

after that is fixed a second error appears:

create3_coverage_core.vcxproj -> C:\***\irobot_create\build\create3_coverage\Release\create3_coverage_core.dll
  Building Custom Rule C:/***/irobot_create/src/create3_examples/create3_coverage/CMakeLists.txt
  main.cpp
LINK : fatal error LNK1181: cannot open input file 'Release\create3_coverage_core.lib' [C:\***\irobot_create\build\create3_coverage\create3_coverage.vcxproj]

This is another very specific building bug. It builds the .dll file just fine but is missing the .lib file which causes this error when it tries to run target_link_libraries(). After endless digging to fine the problem. I added this line (set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)) above the add_library. Once added it builds without errors.

I verify it works by running call install\local_setup.bat in the CMD window for the project directory. Then run this command ros2 run create3_coverage create3_coverage from the readme.

(ros_env) C:\***\irobot_create>ros2 run create3_coverage create3_coverage
[INFO] [1707502413.216754600] [create3_coverage]: Node created!

So it works lol. The point I'm getting at is could you review this 2 changes and possibly add them to the codebase so for those that might wish to run on windows will not have issues building. Of course if necessary add checks so they only get added for windows builds.

I built using this colcon build --cmake-args -DPython3_FIND_VIRTUALENV="ONLY" this forces it to use the specific python from the RoboStack; which is very important.

So far so good I'll be able to control the BOT from windows without much problems now.

create3_teleop missing project

Hi,
The create3_teleop project is missing a reference to the ROS2 teleop_twist_keyboard project.
It would be helpful if a link of the project was added to the Readme file as well as adding it to the installations setup.
Thanks a lot,
Ariel

FeatureRequest: Coverage Server should log specific goal accepted

Currently the Coverage Server logs "Accepting goal request" when passed a proper explore goal, and continues to log actions while performing the explore goal.

The Coverage Server does not log anything for either the /dock or /undock goals. It at least should log accepting these goals (WIBNI the Coverage Server logged what goal was accepted), and success or failure.

UPDATE: This issue asks that the "Accepting goal request" log the specific goal:

"Accepting goal request {explore | dock | undock | wall_follow}"

and log the same completion for dock, undock, wall_follow as is logged for explore:

[INFO] [1635860215.373907229] [create3_coverage]: Coverage action terminated

Simpe exploration without Lidar

I was wondering if there could be an example of a basic aproach to exploration, something like SLAM but without lidar? just something that works with the default sensors of create3 (bump, ir)

create3_coverage fails to build

Hi,
Running the build on the create3_coverage project fails. the output of the error states that the create3_coverage_core.lib file doesn't exist.
I made changes in the CMakeLists.exe file which solved the problem but I'm not sure that the change was correct.
The original file included:
"add_library(${library_name} SHARED
src/behaviors/dock-behavior.cpp
src/behaviors/drive-straight-behavior.cpp
src/behaviors/reflex-behavior.cpp
src/behaviors/rotate-behavior.cpp
src/behaviors/spiral-behavior.cpp
src/behaviors/undock-behavior.cpp
src/behaviors/utils.cpp
src/coverage_state_machine.cpp
src/create3_coverage_node.cpp
)"

I changed the SHARED to STATIC so:
add_library(${library_name} STATIC
src/behaviors/dock-behavior.cpp
src/behaviors/drive-straight-behavior.cpp
src/behaviors/reflex-behavior.cpp
src/behaviors/rotate-behavior.cpp
src/behaviors/spiral-behavior.cpp
src/behaviors/undock-behavior.cpp
src/behaviors/utils.cpp
src/coverage_state_machine.cpp
src/create3_coverage_node.cpp
)
Building then was successful and the create3_coverage_core.lib file was created. Then I changed it back to SHARED and built it again and it worked.
Thanks for your help,
Ariel

Feature Request: create3_coverage server should log start of actions, not only completion

When watching the explore action running, the bot is moving but there is no "Starting drive straight", "Starting Spiral", "Handling Hazard" (or "Back and Rotate"?) to indicate what is happening.

[INFO] [1635608924.038151337] [create3_coverage]: Accepting goal request
[INFO] [1635608924.040617706] [create3_coverage]: Executing goal
[INFO] [1635608924.097034238] [create3_coverage]: Reflexes are enabled on the robot!
[INFO] [1635608924.099398054] [create3_coverage]: Sending undocking goal!
[INFO] [1635608963.909060169] [create3_coverage]: Undocking succeeded!
[INFO] [1635608968.774922245] [create3_coverage]: Reached drive straight max distance: 0.250916
[INFO] [1635608998.841633768] [create3_coverage]: Spiral completed!
[INFO] [1635609001.608250178] [create3_coverage]: Stop driving straight: traveled 0.116123/5.000000: hazards 1 dock 0
[INFO] [1635609048.781359045] [create3_coverage]: Rotation completed: from -0.901778 to 2.134330
[INFO] [1635609058.547966186] [create3_coverage]: Reached drive straight max distance: 0.251280
[INFO] [1635609088.614677887] [create3_coverage]: Spiral completed!
[INFO] [1635609091.614681016] [create3_coverage]: Stop driving straight: traveled 0.138735/5.000000: hazards 1 dock 0
[INFO] [1635609130.881360213] [create3_coverage]: Rotation completed: from -2.568480 to -0.647966
[INFO] [1635609140.781295134] [create3_coverage]: Stop driving straight: traveled 0.173716/0.250000: hazards 1 dock 0
[INFO] [1635609142.847961009] [create3_coverage]: Aborting ROTATE because initial hazard is not getting cleared
[INFO] [1635609142.914624582] [create3_coverage]: Coverage action terminated

Exploring

Improve LIDAR SLAM example

from @alsora 's feedback on #22 :

  • this package contains only python files, so it would be better to have a python-based setup rather than CMake file
  • create additional launch file for rviz and launch file for sensors and SLAM combined, and refer to those, instead
  • use original SLAM Toolbox launch file with our parameters instead of making our own

Coverage Server Does Not Notify Action Client No Create3 Found or max_duration exceeded

I have successfully built the coverage server and dance examples, and see the coverage server accept an explore goal, and start executing the goal.

I do not have the create3_sim built/running yet, so I would have expected the action server to either reject the goal, or fail the goal during execution, and further I would have expected the server to fail the goal after execution reached the max_duration specified.

For the command:

$ ros2 action send_goal /coverage create3_examples_msgs/action/Coverage "{explore_duration:{sec: 60, nanosec: 0}, max_duration:{sec: 120,nanosec: 0}}"
1635117690.493283 [0]       ros2: using network interface wlan0 (udp/10.0.0.29) selected arbitrarily from: wlan0, wlan1
Waiting for an action server to become available...
Sending goal:
     explore_duration:
  sec: 60
  nanosec: 0
max_duration:
  sec: 120
  nanosec: 0

Goal accepted with ID: 2c92ceee7e39452998119399ce611d06

the server reports:

~/create3ros/create3_examples_ws$ ros2 run create3_coverage create3_coverage
1635117665.400946 [0] create3_co: using network interface wlan0 (udp/10.0.0.29) selected arbitrarily from: wlan0, wlan1
[INFO] [1635117665.480589509] [create3_coverage]: Node created!
[INFO] [1635117690.802468310] [create3_coverage]: Accepting goal request
[INFO] [1635117690.805057962] [create3_coverage]: Executing goal

and appears to ignore the max_duration.

Create 3 dance example should return control of the lights to the robot

Create 3 dance example should return control of the lights to the robot.

Currently, when the dance ends, the robot remains with colored lights.
This requires to manually issue

ros2 topic pub /cmd_lightring irobot_create_msgs/msg/LightringLeds "{override_system: false, leds: [{red: 255, green: 0, blue: 0}, {red: 0, green: 255, blue: 0}, {red: 0, green: 0, blue: 255}, {red: 255, green: 255, blue: 0}, {red: 255, green: 0, blue: 255}, {red: 0, green: 255, blue: 255}]}" -1

to return control to the robot.

iRobot Create3 Dance tutorial not working

Setup:
Raspberry Pi 4
Ubuntu 22.04
ROS 2 Humble installed

I have the Pi connected to the Roomba's Create® 3 adapter board via a USB-C to USB-C cable.

I am following this instructions:
https://github.com/iRobotEducation/create3_examples/tree/humble/create3_examples_py

This is the command I am running (according to the README):
ros2 run create3_examples_py create3_dance

The Roomba does not move at all, and the terminal has this message showing up:
[dance_command_publisher] service not available, waiting again

What could be causing this issue? Any help is appreciated!

Aborting ROTATE because initial hazard is not getting cleared?

Why did the hazard not clear and the explore continue? (This doesn't look like a complex hazard situation.)

[INFO] [1635609142.847961009] [create3_coverage]: Aborting ROTATE because initial hazard is not getting cleared

Exploring

The full log:

[INFO] [1635608924.038151337] [create3_coverage]: Accepting goal request
[INFO] [1635608924.040617706] [create3_coverage]: Executing goal
[INFO] [1635608924.097034238] [create3_coverage]: Reflexes are enabled on the robot!
[INFO] [1635608924.099398054] [create3_coverage]: Sending undocking goal!
[INFO] [1635608963.909060169] [create3_coverage]: Undocking succeeded!
[INFO] [1635608968.774922245] [create3_coverage]: Reached drive straight max distance: 0.250916
[INFO] [1635608998.841633768] [create3_coverage]: Spiral completed!
[INFO] [1635609001.608250178] [create3_coverage]: Stop driving straight: traveled 0.116123/5.000000: hazards 1 dock 0
[INFO] [1635609048.781359045] [create3_coverage]: Rotation completed: from -0.901778 to 2.134330
[INFO] [1635609058.547966186] [create3_coverage]: Reached drive straight max distance: 0.251280
[INFO] [1635609088.614677887] [create3_coverage]: Spiral completed!
[INFO] [1635609091.614681016] [create3_coverage]: Stop driving straight: traveled 0.138735/5.000000: hazards 1 dock 0
[INFO] [1635609130.881360213] [create3_coverage]: Rotation completed: from -2.568480 to -0.647966
[INFO] [1635609140.781295134] [create3_coverage]: Stop driving straight: traveled 0.173716/0.250000: hazards 1 dock 0
[INFO] [1635609142.847961009] [create3_coverage]: Aborting ROTATE because initial hazard is not getting cleared
[INFO] [1635609142.914624582] [create3_coverage]: Coverage action terminated

Request for LIDAR SLAM tutorial

Discussed in iRobotEducation/create3_docs#54

Originally posted by Yskandar May 12, 2022
Hey everyone,

I am with a robotics lab at UCLA and we are interested in this product, we're looking for a robot on which we could perform ros-based slam without struggling to much in installations and such.

To be more specific, here is what I want to do:

  • I want to mount the RPLiDAR A1 (or A2) on top of the create 3, and I want to be able to access on my computer both the topics published/subscribed by both the create 3 and the RPLiDAR. Then, I want to use the slam_toolbox (or any other package) on my computer, using the scans from the LiDAR and other informations from the create3 topics.

After reading the docs and the issues in the discussion, the following questions remain:

  1. Do I need a Raspberry Pi? I would gess so since I would like to access both the create3 and rplidar topics by wifi, since usb cables are a pain for mobile robots.

  2. Is there a ROS 2 package for the create 3 that I would need to launch from my computer to access the topics of the create3 ? Or is it enough to follow the docs, meaning connect to the create 3 wifi, update the firmware and then the topics of the create3 will magically appear in my ROS2 server on my computer ?

  3. The RPLiDAR's packages are in ROS1 if I am not mistaken, is this gonna be a problem? I've seen that "shamlian" used the A1 with create 3 so I'm guessing there won't be a problem.

Sorry for this long post, thank you in advance for your help !!

Yskandar

RPLidar connection notes

Suggestions for the documentation:

  • Note that for an RPLidar A2, if the cable is coming out towards the tray, you need to set flip_axis to true in config/rplidar_node.yaml . I'm assuming this value is fine as it is specified for the A1 which is used in the readme. You can tell that Something Is Wrong by looking at the /scan topic in rviz and driving it towards a wall (set fixed frame to base_link)-- the scan hits will move the wrong direction unless you flip the x axis.

  • You can make the following changes to ensure that the LIDAR is always available at a fixed device file:

  1. Connect RPLidar USB adapter to SBC and run sudo lsusb. Look for the section describing the UART bridge:
Bus 001 Device 004: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               1.10
 bDeviceClass            0
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0        64
 idVendor           0x10c4 Silicon Labs
 idProduct          0xea60 CP210x UART Bridge

Note the "idVendor" and "idProduct" fields (0x10c4, 0xea60 respectively)
2. Create a file under /etc/udev/rules.d to handle usb-serial device connections and automatically symlink to a predictable location

Create /etc/udev/rules.d/99-usb-serial.rules (or similar file)

SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="lidar_0"

  1. Set the serial_port entry in config/rplidar_node.yaml to /dev/lidar_0
  2. Rebuild the workspace

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.