Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create e-puck2 driver #59

Merged
merged 58 commits into from
Apr 1, 2020
Merged

Create e-puck2 driver #59

merged 58 commits into from
Apr 1, 2020

Conversation

lukicdarkoo
Copy link
Member

@lukicdarkoo lukicdarkoo commented Mar 17, 2020

Description
ROS2 e-puck2 driver for Webots should be created. The API should match to one implemented for epuck_ros2 (https://github.com/cyberbotics/epuck_ros2).

Tasks

  • Support for camera (Image and CameraInfo).
  • Add Odometry topic
  • Support for LEDs.
  • Add Twist topic.
  • Add LaserScan topic.
  • Add Imu topic.
  • Publish corresponding transformations.
  • Match LED API with epuck_ros2
  • Add support for light sensors
  • Add support for ground sensors if present
  • Publish static transforms
    • ground sensors,
    • distance sensors,
    • light sensors and
    • laser scanner.
  • Verify compatibility with epuck_ros2 API
  • Verify everything in simulation
    • Odometry + Twist
    • Camera + CameraInfo
    • LaserScan + Range
    • Ground sensors
    • Light sensors
  • Make gyroscope, ground sensors and ToF optional to keep backwards compatibility

@ghost
Copy link

ghost commented Mar 17, 2020

DeepCode's analysis on #2d9c58 found:

3 minor issues. ✔️ 0 issues were fixed.

👉 View analysis in DeepCode’s Dashboard

☺️ If you want to provide feedback on our bot, here is how to contact us.

@lukicdarkoo lukicdarkoo added the enhancement New feature or request label Mar 17, 2020
@lukicdarkoo lukicdarkoo self-assigned this Mar 17, 2020
@lukicdarkoo
Copy link
Member Author

@DavidMansolino Should we change a name from webots_ros2_epuck2 to webots_ros2_epuck?

@DavidMansolino
Copy link
Member

DavidMansolino commented Mar 31, 2020

@DavidMansolino Should we change a name from webots_ros2_epuck2 to webots_ros2_epuck?

That's a good idea indeed, but in that case, please make sure that it is working with the simulated e-puck 1 too (the controller should handle the missing devices such as ToF and Gyro).

@lukicdarkoo
Copy link
Member Author

lukicdarkoo commented Mar 31, 2020

@DavidMansolino Should we change a name from webots_ros2_epuck2 to webots_ros2_epuck?

That's a good idea indeed, but in that case, please make sure that it is working with the simulated e-puck 1 too (the controller should handle the missing devices such as ToF and Gyro).

Well, gyro supposed to be available in e-puck1 as well according to documentation. It seems it misses in the model. Here is a comparison between e-puck1 and e-puck2:
https://www.gctronic.com/doc/index.php/e-puck2
in e-puck2 3D magnetometer is added. Btw, the magnetometer also seems to be missing in e-puck2 proto, maybe I should add. As well as the support for the sensor in the physical robot.

Anyway, it is a good idea to make everything optional to preserve backwards compatibility.

webots_ros2_epuck/webots_ros2_epuck/driver.py Outdated Show resolved Hide resolved
webots_ros2_epuck/README.md Outdated Show resolved Hide resolved
webots_ros2_epuck/setup.py Outdated Show resolved Hide resolved
Copy link
Member

@DavidMansolino DavidMansolino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note also that to make this code easily re-usable and make it more generic I would like that you create a WebotsDifferentialWheelNode (or any better name) that inherits from WebotsNode and is in the webots_ros2_core package and provides all the functionalities related to the odom publisher and cmd_vel subscriber (the EPuckDriver class will then inherit from this class).

This way it will be very simple to create new differential wheels robot nodes based on this excellent code you did. For example the webots_ros2_tiagocould use it.
But please don't do this in this PR as it is already very good and functional like this (and start to be quite big 😉).

@lukicdarkoo
Copy link
Member Author

Note also that to make this code easily re-usable and make it more generic I would like that you create a WebotsDifferentialWheelNode (or any better name) that inherits from WebotsNode and is in the webots_ros2_core package and provides all the functionalities related to the odom publisher and cmd_vel subscriber (the EPuckDriver class will then inherit from this class).

This way it will be very simple to create new differential wheels robot nodes based on this excellent code you did. For example the webots_ros2_tiagocould use it.
But please don't do this in this PR as it is already very good and functional like this (and start to be quite big ).

I love the idea! I will do it! Gazebo is doing something similar (http://gazebosim.org/tutorials?tut=ros_gzplugins) but this could be a cleaner and more configurable approach.

lukicdarkoo and others added 4 commits March 31, 2020 18:08
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Copy link
Member

@DavidMansolino DavidMansolino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@lukicdarkoo lukicdarkoo merged commit 0af68cb into master Apr 1, 2020
@lukicdarkoo lukicdarkoo deleted the epuck2 branch April 1, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

2 participants