Thumbnail

Chromium

by Google

Full-featured chrome web browser robot skill that can be configured using control commands.

Requires ARC v7 (Updated 11/25/2024)

How to add the Chromium robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Display category tab.
  5. Press the Chromium icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Chromium robot skill.

How to use the Chromium robot skill

Full-featured Chrome web browser robot skill that can be configured using control commands.

Main Window

User-inserted image

  1. Print the current page

  2. Maximize or restore the window state

  3. Open the current page in the PC default browser

  4. The current URL or enter a custom URL (press enter to browse)

  5. The web content

Config Window The config window, which displays settings that can be configured for the robot skill's behavior, can be accessed by pressing the three little dots on the skill's top left menu. 

User-inserted image

  1. Default URL: The default URL that will load when the project is loaded

  2. Set Global Variable: This checkbox will specify if the global variable is set with the contents of the loaded page. The global variable will be $ChromiumContent by default. You can edit that variable when this checkbox is set in the field below it. If this option is enabled, the robot skill should wait until the page is loaded before setting the variable which means it will block the ControlCommand call. However, because the chromium browser is developed by a third party (google), this functionality may change because they don't want bots to be created with it. So if you find the variable is not being updated with the latest page data, you may have to sleep() to wait an amount of time and cross your fingers that the page has loaded and the variable is set.

ControlCommands

A ControlCommand() for this robot skill allows the URL to be specified and viewed.  View the Cheat Sheet for easier access to this command.

ControlCommand("Chromium", "NavigateTo", "URL") Specify the name of this robot skill in your project (i.e. chromium) Specify the URL to navigate to.

ControlCommand("Chromium", "WindowMaximize") Maximizes the robot skill window into the virtual desktop that it resides in.

ControlCommand("Chromium", "WindowNormal") Restores the window to a normal size within the virtual desktop that it resides in.


ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

PRO
Canada
#1   — Edited

Interesting. So can a robot that is controlled by a browser interface, be controlled using this. Example if it uses the typical keyboard controls can we then connect that to a movement panel?

#3  

@Nink,  Were you thinking of controlling 3rd party web controlled robots like the Rovio?  (I know, old bot, but it is one I have, and it is web based).

If you can figure out the web commands, you could use a custom movement panel.  I haven't gotten the Rovio to work that way, but it uses Javascript, not simple HTML.  It is probably doable by having the Movement Panel call scripts to run Javascript now that ARC supports it as a scripting language, but I haven't spent the time to try to figure it out.

In any case, I don't think that was the intent of this skill.  This is more to allow your robot to display web pages.  My use case is that I have a web cam with IR that I wanted to use in a robot, just for remote night vision (not using it for any detection events) and it works in a browser, but there is something strange with its mpeg header and it doesn't work in the ARC camera control (although again, DJ did some recent updates and I haven't retested).

PRO
Canada
#5  

Hi @Alan,

I am going to connect a Quad A1 to Synthiam.  (See the robot dog thread).  Initially we were thinking of writing a driver for the Moteus but I figured since Josh has already written various gaits and motions all I need to integrate with them.  On further inspection it looks like he supports a series of JSON commands that I can send to the robot.  https://github.com/mjbots/quad/blob/main/mech/quadruped_command.h#L28

You can see an example of its use at: https://github.com/mjbots/quad/blob/main/mech/web_control_assets/js/app.js#L517

So I will be begging for support (As always) with help to get this working when the time comes.

#6   — Edited

deleted - posted in wrong thread

PRO
Australia
#7   — Edited

I was looking at the Chromium Skill and noted it can call up images from my PC. But the ControlCommand for setting the URL does not exist. If it did, I could use ShowDesktop() to show the Chromium Window with photo and text - see below:

User-inserted image

PRO
Synthiam
#8  

Let me take a look at that later this evening for ya. I'm taking a bit of a break tonight, given that it's sunday evening:)

PRO
Australia
#10  

Thanks for making the effort to do this so promptly. It works brilliantly. Chromium is a much better option for me than trying to use the Full Screen Video Player. I am sure others users will make use of it too.

PRO
Canada
#11  

I think the browser is under-utilized. ARC should really provide full gui support via the http server.  If you install the custom http server you can see there are some basic controls for robot and a camera. (It’s under remote control tab in project). As I mentioned in your other thread there is also websocket under the communication tab so you can build a full web based control panel and do what you want. You can also then control from a tablet if you like.

One day we may have an entire browser based version of ARC so we can run any skill direct from a browser and control from any device with a browser. After that you could even containerize ARC put ARC in the cloud and then use it as a service.

PRO
Australia
#13  

Something for next year. The ControlCommand("Chromium", "NavigateTo", &Filename) needs a maximize option. It defaults to normal which is a bit annoying. Have to maximize manually.

#14  

v6 includes control commands to maximize and normalize the window state

PRO
Australia
#15  

Brilliant. You deserve a holiday. Works perfectly. I created 90 HTML files which all display nicely with minimal coding effort.

PRO
Canada
#16  

The Chromium robot skill in ARC has been updated to version 7, which includes a new feature that allows you to set a global variable with the contents of the loaded page. Here's a detailed explanation of this feature:

New Feature: Set Global Variable

  • Purpose: This feature allows you to store the contents of the web page loaded in the Chromium robot skill into a global variable. This can be useful for further processing or analysis within your ARC project.

  • Configuration:

    • Access: You can access this setting in the configuration window of the Chromium robot skill. To open the configuration window, click on the three little dots (kebab menu) in the top left corner of the skill.
    • Default URL: You can set a default URL that will load when the project is started.
    • Set Global Variable: There is a checkbox labeled "Set Global Variable." When checked, the contents of the loaded page will be stored in a global variable.
    • Global Variable Name: By default, the global variable is named $ChromiumContent. You can edit this name in the field provided if you wish to use a different variable name.

Control Commands

The Chromium robot skill also supports several control commands to interact with the browser programmatically:

  • Navigate to URL:

    ControlCommand("Chromium", "NavigateTo", "URL")
    
    • This command navigates the Chromium browser to the specified URL.
  • Maximize Window:

    ControlCommand("Chromium", "WindowMaximize")
    
    • This command maximizes the Chromium window within the virtual desktop.
  • Normalize Window:

    ControlCommand("Chromium", "WindowNormal")
    
    • This command restores the Chromium window to its normal size within the virtual desktop.

Usage

With these features, you can automate the process of loading web pages and capturing their content for use in your ARC projects. This can be particularly useful for projects that require web data integration or display.

If you have any more questions or need further assistance, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.